00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "CameraInfo.h"
00011
00012 CameraInfo::CameraInfo() :
00013 resolutionWidth(cameraResolutionWidth_ERS7),
00014 resolutionHeight(cameraResolutionHeight_ERS7),
00015 openingAngleWidth(openingAngleWidth_ERS7),
00016 openingAngleHeight(openingAngleHeight_ERS7),
00017 focalLength(focalLength_ERS7),
00018 focalLengthMM(focalLengthMM_ERS7),
00019 pixelPerMM(pixelPerMM_ERS7),
00020 opticalCenter(opticalCenterX_ERS7, opticalCenterY_ERS7),
00021 secondOrderRadialDistortion(secondOrderRadialDistortion_ERS7),
00022 fourthOrderRadialDistortion(fourthOrderRadialDistortion_ERS7),
00023 focalLenPow2(focalLength*focalLength),
00024 focalLenPow4(focalLength*focalLength*focalLength*focalLength),
00025 focalLengthInv(1.0/focalLength),
00026 simulated(false)
00027 {
00028 }
00029
00030 CameraInfo::CameraInfo(RobotDesign::Design robotDesign) :
00031 resolutionWidth(robotDesign == RobotDesign::ERS210 ? cameraResolutionWidth_ERS210 : cameraResolutionWidth_ERS7),
00032 resolutionHeight(robotDesign == RobotDesign::ERS210 ? cameraResolutionHeight_ERS210 : cameraResolutionHeight_ERS7),
00033 openingAngleWidth(robotDesign == RobotDesign::ERS210 ? openingAngleWidth_ERS210 : openingAngleWidth_ERS7),
00034 openingAngleHeight(robotDesign == RobotDesign::ERS210 ? openingAngleHeight_ERS210 : openingAngleHeight_ERS7),
00035 focalLength(robotDesign == RobotDesign::ERS210 ? focalLength_ERS210 : focalLength_ERS7),
00036 focalLengthMM(robotDesign == RobotDesign::ERS210 ? focalLengthMM_ERS210 : focalLengthMM_ERS7),
00037 pixelPerMM(robotDesign == RobotDesign::ERS210 ? pixelPerMM_ERS210 : pixelPerMM_ERS7),
00038 opticalCenter(robotDesign == RobotDesign::ERS210 ? opticalCenterX_ERS210 : opticalCenterX_ERS7,
00039 robotDesign == RobotDesign::ERS210 ? opticalCenterY_ERS210 : opticalCenterY_ERS7),
00040 secondOrderRadialDistortion(robotDesign == RobotDesign::ERS210 ? secondOrderRadialDistortion_ERS210 : secondOrderRadialDistortion_ERS7),
00041 fourthOrderRadialDistortion(robotDesign == RobotDesign::ERS210 ? fourthOrderRadialDistortion_ERS210 : fourthOrderRadialDistortion_ERS7),
00042 focalLenPow2(focalLength*focalLength),
00043 focalLenPow4(focalLength*focalLength*focalLength*focalLength),
00044 focalLengthInv(1.0/focalLength),
00045 simulated(false)
00046 {
00047 }
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087