Update of /cvsroot/playerstage/code/gazebo/server/sensors/Camera
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29514/server/sensors/Camera

Modified Files:
        Camera.cc Camera.hh 
Log Message:
Changed libgazebo liscense to LGPL

Index: Camera.hh
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/server/sensors/Camera/Camera.hh,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** Camera.hh   20 Oct 2005 17:02:11 -0000      1.39
--- Camera.hh   16 Dec 2006 19:02:23 -0000      1.40
***************
*** 103,106 ****
--- 103,110 ----
    public: const unsigned char *GetImageData() const {return this->rgbImage;}
  
+   /// @brief Get a pointer to the greyscale image data
+   public: const unsigned char *GetGreyImageData() const {return 
this->greyImage;}
+ 
+ 
    /// @brief Get the Z-buffer value at the given image coordinate.
    ///
***************
*** 170,173 ****
--- 174,178 ----
    // RGB image buffer
    private: uint8_t *rgbImage;
+   private: uint8_t *greyImage;
  
    // Store projection matrix for GUI calculations

Index: Camera.cc
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/server/sensors/Camera/Camera.cc,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** Camera.cc   14 Feb 2006 03:08:17 -0000      1.74
--- Camera.cc   16 Dec 2006 19:02:23 -0000      1.75
***************
*** 59,62 ****
--- 59,63 ----
    this->imageWidth = this->imageHeight = 0;
    this->rgbImage = NULL;
+   this->greyImage = NULL;
  
    this->saveEnable = false;
***************
*** 124,127 ****
--- 125,129 ----
    int imageSize = this->imageWidth * this->imageHeight;
    this->rgbImage = new uint8_t[imageSize * 3];
+   this->greyImage = new uint8_t[imageSize];
      
    // Initialize display options
***************
*** 293,297 ****
    glPixelStorei(GL_PACK_ALIGNMENT, 1);
    glReadPixels(0, 0, this->imageWidth, this->imageHeight,
!       GL_RGB, GL_UNSIGNED_BYTE, this->rgbImage);
    PRINT_GL_ERR();
  
--- 295,303 ----
    glPixelStorei(GL_PACK_ALIGNMENT, 1);
    glReadPixels(0, 0, this->imageWidth, this->imageHeight,
!     GL_RGB, GL_UNSIGNED_BYTE, this->rgbImage);
! 
!   glReadPixels(0, 0, this->imageWidth, this->imageHeight,
!       GL_GREEN, GL_UNSIGNED_BYTE, this->greyImage);
! 
    PRINT_GL_ERR();
  
***************
*** 526,530 ****
    FILE *fp;
    
!   sprintf(tmp, "%s/%04d.pnm", this->savePathname, this->saveCount);
  
    fp = fopen( tmp, "wb" );
--- 532,537 ----
    FILE *fp;
    
!   //sprintf(tmp, "%s/%04d.pnm", this->savePathname, this->saveCount);
!   sprintf(tmp, "%s/%04d.pgm", this->savePathname, this->saveCount);
  
    fp = fopen( tmp, "wb" );
***************
*** 536,542 ****
    }
    
!   fprintf( fp, "P6\n# Gazebo\n%d %d\n255\n", this->imageWidth, 
this->imageHeight);
    for (int i = this->imageHeight-1; i >= 0; i--)
!     fwrite( this->rgbImage + i * this->imageWidth * 3, 1, this->imageWidth * 
3, fp );
  
    fclose( fp );
--- 543,550 ----
    }
    
!   fprintf( fp, "P5\n# Gazebo\n%d %d\n255\n", this->imageWidth, 
this->imageHeight);
    for (int i = this->imageHeight-1; i >= 0; i--)
! //    fwrite( this->rgbImage + i * this->imageWidth * 3, 1, this->imageWidth 
* 3, fp );
!     fwrite( this->greyImage + i * this->imageWidth, 1, this->imageWidth, fp );
  
    fclose( fp );


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to