00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __FIREVISION_PROJECTIVE_CAM_H__
00025 #define __FIREVISION_PROJECTIVE_CAM_H__
00026
00027 #include <models/camera/calibration.h>
00028 #include <geometry/hom_transform.h>
00029 #include <fvutils/base/types.h>
00030
00031 #include <core/exception.h>
00032
00033 namespace firevision {
00034 #if 0
00035 }
00036 #endif
00037
00038 class AboveHorizonException : public fawkes::Exception
00039 {
00040 public:
00041 AboveHorizonException(const char *msg, const center_in_roi_t img_pt) throw();
00042
00043 const center_in_roi_t& get_img_pt() const;
00044
00045 private:
00046 center_in_roi_t __img_pt;
00047 };
00048
00049 class ProjectiveCam
00050 {
00051 public:
00052 ProjectiveCam(const ProjectiveCam& pc);
00053 virtual ~ProjectiveCam();
00054
00055
00056
00057 virtual ProjectiveCam& set_location(const fawkes::HomTransform& loc);
00058 virtual ProjectiveCam& set_location(float roll, float pitch, float yaw, float height, float x = 0, float y = 0);
00059
00060 virtual fawkes::cart_coord_2d_t get_GPA_world_coord(const center_in_roi_t &img_p) const;
00061 virtual center_in_roi_t get_GPA_image_coord(const fawkes::cart_coord_2d_t &wld_p) const;
00062
00063 virtual void print_info (const char* name = 0, const char *col_sep = 0, const char *row_sep = 0) const;
00064
00065 protected:
00066 ProjectiveCam(const Calibration &cal, const fawkes::HomTransform *loc = 0);
00067 ProjectiveCam(const Calibration &cal, float roll, float pitch, float yaw, float height, float x = 0, float y = 0);
00068 Calibration get_cal() const;
00069
00070 fawkes::Matrix get_p() const;
00071 fawkes::Matrix get_GPA_p() const;
00072
00073 private:
00074 Calibration __cal;
00075 fawkes::Matrix *__p;
00076 fawkes::Matrix *__gpa_inv;
00077 float *__gpa_inv_data;
00078 };
00079
00080 }
00081
00082 #endif // __FIREVISION_PROJECTIVE_CAM_H__