Follow this link to skip to the main content

a_camera.cc

Go to the documentation of this file.
00001 // -*-c++-*-
00002 //---------------------------< /-/ CLARAty /-/ >------------------------------
00003 /**
00004  * @file  a_camera.cc
00005  *
00006  * Implement a File Camera that reads an image from file I/O
00007  *
00008  * <br>@b Designer(s):  Daniel Clouse, Clay Kunz, Issa Nesnas
00009  * <br>@b Author(s):    Daniel Clouse, Issa A.D. Nesnas
00010  * <br>@b Date:         June 9, 2006
00011  *
00012  * <b>Software License:</b><br>
00013  * <code>  http://claraty.jpl.nasa.gov/license/open_src/  or
00014  *         file: license/open_src.txt  </code>
00015  *
00016  * &copy; 2006, Jet Propulsion Laboratory, California Institute of Technology<br>
00017  *
00018  * $Revision: 1.5 $
00019  */
00020 //-----------------------------------------------------------------------------
00021 
00022 #include "claraty/a_camera.h"
00023 #include "claraty/image.h"
00024 #include <iostream>
00025 
00026 using namespace std;
00027 
00028 namespace claraty {
00029 
00030 //-----------------------------------------------------------------------------
00031 /**
00032  * [description]
00033  *
00034  * @param [in]   image
00035  * @param [in]   timestamp_ptr
00036  * @param [in]   feature_map_ptr
00037  */
00038 void A_Camera::
00039 acquire(Image<uint8_t> & image,
00040         Time * timestamp_ptr,
00041         Feature_Map * feature_map_ptr) throw (std::exception)
00042 {
00043   image.resize(1024, 1024);
00044   for(int x = 0; x < image.get_width(); ++x) {
00045     for(int y = 0; y < image.get_height(); ++y) {
00046       image(x, y) = x * y % 256;
00047     }
00048   }
00049   cout << image;
00050 }
00051 
00052 //-----------------------------------------------------------------------------
00053 /**
00054  * [description]
00055  *
00056  * @param [in]   image
00057  * @param [in]   timestamp_ptr
00058  * @param [in]   feature_map_ptr
00059  */
00060 void A_Camera::
00061 acquire(Image<uint16_t> & image,
00062         Time * timestamp_ptr,
00063         Feature_Map * feature_map_ptr) throw (std::exception)
00064 {
00065   image.resize(1024, 1024);
00066   for(int x = 0; x < image.get_width(); ++x) {
00067     for(int y = 0; y < image.get_height(); ++y) {
00068       image(x, y) = x * y % 65536;
00069     }
00070   }
00071 }
00072 
00073 } // namespace claraty