RawImage.h
Go to the documentation of this file.00001 #ifndef RAW_IMAGE_H
00002 #define RAW_IMAGE_H
00003
00004 #include "Shared/fmat.h"
00005 #include "Vision/RawCameraGenerator.h"
00006
00007 class RawImage {
00008
00009 public:
00010 RawImage(unsigned int width, unsigned int height);
00011
00012 float& operator() (int x, int y);
00013 float& operator() (unsigned int x, unsigned int y);
00014 float operator() (float x, float y);
00015
00016 fmat::Column<2> gradient(float x, float y);
00017 fmat::Matrix<2,2> gradientCov(float x, float y);
00018 fmat::Matrix<2,2> spatialGradientMatrix(float center_x,
00019 float center_y,
00020 int window);
00021
00022 float imageScore(float x, float y, int window);
00023
00024 void loadFromRawY();
00025 void buildNextLayer(RawImage &img);
00026
00027 unsigned int getHeight() { return height; }
00028 unsigned int getWidth() { return width; }
00029
00030 void printImage();
00031
00032 private:
00033 unsigned int width;
00034 unsigned int height;
00035 std::vector<float> imageData;
00036
00037 unsigned int clampX(int x);
00038 unsigned int clampY(int y);
00039 };
00040
00041 #endif