Superpixel Benchmark
Superpixel benchmark, tools and algorithms.
Public Member Functions | Public Attributes | List of all members
DepthTools::Camera Struct Reference

Represents basic intrinsic parameters used to project pixels into a point cloud. More...

#include <depth_tools.h>

Public Member Functions

float projectZ (unsigned short depth, float factor=1000.f) const
 Get the z coordinate of the projected point given the depth as depth/factor. More...
 
template<typename T >
float projectX (T x, unsigned short depth, float factor=1000.f) const
 Given the depth by depth/factor, project the x coordinate into 3D room. More...
 
template<typename T >
float projectY (T y, unsigned short depth, float factor=1000.f) const
 Given the depth by depth/factor, project the y coordinate into 3D room. More...
 
int backprojectX (float x, float depth, float factor=1000.f) const
 Given the depth by depth/factor, back project the x coordinate to image plain. More...
 
int backprojectY (float y, float depth, float factor=1000.f) const
 Given the depth by depth/factor, back project the y coordinate to image plain. More...
 

Public Attributes

float cropping_x
 If the image was cropped in x dimension by a specific number of pixels. More...
 
float cropping_y
 If the images was cropped in y dimension by a specific number of pixels. More...
 
float principal_x
 Principal point x coordinate. More...
 
float principal_y
 Principal point y coordinate. More...
 
float focal_x
 Focal length in x. More...
 
float focal_y
 Focal length in y. More...
 

Detailed Description

Represents basic intrinsic parameters used to project pixels into a point cloud.

Member Function Documentation

int DepthTools::Camera::backprojectX ( float  x,
float  depth,
float  factor = 1000.f 
) const

Given the depth by depth/factor, back project the x coordinate to image plain.

Parameters
[in]xx coordinate
[in]depthdepth coordinate
[in]factorfactor to multiply depth by
Returns
x coordinate
int DepthTools::Camera::backprojectY ( float  y,
float  depth,
float  factor = 1000.f 
) const

Given the depth by depth/factor, back project the y coordinate to image plain.

Parameters
[in]yy coordinate
[in]depthdepth coordinate
[in]factorfactor to multiply depth with
Returns
y coordinate
template<typename T >
template float DepthTools::Camera::projectX< float > ( x,
unsigned short  depth,
float  factor = 1000.f 
) const

Given the depth by depth/factor, project the x coordinate into 3D room.

Parameters
[in]xx coordinate
[in]depthdepth as unsigned short
[in]factorfactor to divide depth by
Returns
x coordinate
template<typename T >
template float DepthTools::Camera::projectY< float > ( y,
unsigned short  depth,
float  factor = 1000.f 
) const

Given the depth by depth/factor, project the y coordinate into 3D room.

Parameters
[in]yy coordinate
[in]depthdepth as unsigned short
[in]factorfactor to divide depth by
Returns
y coordinate
float DepthTools::Camera::projectZ ( unsigned short  depth,
float  factor = 1000.f 
) const

Get the z coordinate of the projected point given the depth as depth/factor.

Parameters
[in]depthdepth as unsigned short
[in]factorfactor to divide depth by
Returns
z coordinate

Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.

Member Data Documentation

float DepthTools::Camera::cropping_x

If the image was cropped in x dimension by a specific number of pixels.

float DepthTools::Camera::cropping_y

If the images was cropped in y dimension by a specific number of pixels.

float DepthTools::Camera::focal_x

Focal length in x.

float DepthTools::Camera::focal_y

Focal length in y.

float DepthTools::Camera::principal_x

Principal point x coordinate.

float DepthTools::Camera::principal_y

Principal point y coordinate.


The documentation for this struct was generated from the following files: