Open main menu

CDOT Wiki β

Team Z

Revision as of 21:23, 10 February 2013 by Bapatel6 (talk | contribs) (Project Image Spitfire)

Team Z

Team Members

  1. Bhrugesh Patel

Assignment 1

Project Image Spitfire

I am using the Image Processor code that Natalia found as the source code to find the CUDA optimization possibilities. The image processor includes various functions like displaying image, getting sub image, enlarge image, shrink image, reflect image, translate image, image rotation and image negative. The application uses lots of for looping to achieve its goal and this provide an opportunity to use the GPU to achieve output much faster and hence enhancing the application performance.

Some of the source code that can be enhanced is as follows.

Image::Image(int numRows, int numCols, int grayLevels)

/* Creates an Image of numRows x numCols and creates the arrays for it*/ {

   N = numRows;
   M = numCols;
   Q = grayLevels;
  
   pixelVal = new int *[N];
   for(int i = 0; i < N; i++)
   {
       pixelVal[i] = new int [M];
       for(int j = 0; j < M; j++)
           pixelVal[i][j] = 0;
   }

}


// Convert the unsigned characters to integers

int val;

for(i=0; i<N; i++)

   for(j=0; j<M; j++)
   {
       val = (int)charImage[i*M+j];
       image.setPixelVal(i, j, val);     
   }

Assignment 2

Assignment 3