ccDepthBuffer.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  4. //# #
  5. //# This program is free software; you can redistribute it and/or modify #
  6. //# it under the terms of the GNU General Public License as published by #
  7. //# the Free Software Foundation; version 2 or later of the License. #
  8. //# #
  9. //# This program is distributed in the hope that it will be useful, #
  10. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  11. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  12. //# GNU General Public License for more details. #
  13. //# #
  14. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_DEPTH_BUFFER_HEADER
  18. #define CC_DEPTH_BUFFER_HEADER
  19. //local
  20. #include "qCC_db.h"
  21. #include <CCGeom.h>
  22. //System
  23. #include <vector>
  24. //! Sensor "depth map"
  25. /** Contains an array of depth values (along each scanned direction) and its dimensions.
  26. This array corresponds roughly to what have been "seen" by the sensor during
  27. acquisition (the 3D points are simply projected in the sensor frame).
  28. **/
  29. class QCC_DB_LIB_API ccDepthBuffer
  30. {
  31. public:
  32. //! Default constructor
  33. ccDepthBuffer();
  34. //! Destructor
  35. virtual ~ccDepthBuffer();
  36. //! Z-Buffer grid
  37. std::vector<PointCoordinateType> zBuff;
  38. //! Pitch step (may differ from the sensor's)
  39. PointCoordinateType deltaPhi;
  40. //! Yaw step (may differ from the sensor's)
  41. PointCoordinateType deltaTheta;
  42. //! Buffer width
  43. unsigned width;
  44. //! Buffer height
  45. unsigned height;
  46. //! Clears the buffer
  47. void clear();
  48. //! Applies a mean filter to fill small holes (= lack of information) of the depth map.
  49. /** The depth buffer must have been created before (see GroundBasedLidarSensor::computeDepthBuffer).
  50. \return a negative value if an error occurs, 0 otherwise
  51. **/
  52. int fillHoles();
  53. };
  54. #endif //CC_DEPTH_BUFFER_HEADER