Ejemplo n.º 1
0
    void CylindricalPointProjector::projectIntervals(IntervalImage &intervalImage, 
						     const DepthImage &depthImage, 
						     const float worldRadius) const {
      assert(depthImage.rows > 0 && depthImage.cols > 0 && "CylindricalPointProjector: Depth image has zero dimensions");
      intervalImage.create(depthImage.rows, depthImage.cols);
      for(int r = 0; r < depthImage.rows; r++){
	const float *f = &depthImage(r, 0);
	cv::Vec2i *i = &intervalImage(r, 0);
	for(int c = 0; c < depthImage.cols; c++, f++, i++) {
	  *i = _projectInterval(r, c, *f, worldRadius);
	}
      }
    }
Ejemplo n.º 2
0
  void SphericalPointProjector::projectIntervals(IntervalImage &intervalImage, 
						 const DepthImage &depthImage, 
						 const float worldRadius) const {
    if(_imageRows == 0 ||  _imageCols == 0) { 
      throw "SphericalPointProjector: Depth image has zero dimensions";
    }    
    intervalImage.create(depthImage.rows, depthImage.cols);
    for(int r = 0; r < depthImage.rows; r++){
    	const float *f = &depthImage(r, 0);
	cv::Vec2i *i = &intervalImage(r, 0);
    	for(int c = 0; c < depthImage.cols; c++, f++, i++) {
    	  *i = _projectInterval(r, c, *f, worldRadius);
    	}
    }
  }