README 7.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //========================================================================================================================================================================================================200
  2. // INFORMATION
  3. //========================================================================================================================================================================================================200
  4. //======================================================================================================================================================150
  5. // UPDATE
  6. //======================================================================================================================================================150
  7. // 2006.03 Rob Janiczek
  8. // --creation of prototype version
  9. // 2006.03 Drew Gilliam
  10. // --rewriting of prototype version into current version
  11. // --got rid of multiple function calls, all code in a single function (for speed)
  12. // --code cleanup & commenting
  13. // --code optimization efforts
  14. // 2006.04 Drew Gilliam
  15. // --added diffusion coefficent saturation on [0,1]
  16. // 2009.07 Lukasz G. Szafaryn
  17. // -- converted from C to CUDA
  18. // 2009.12 Lukasz G. Szafaryn
  19. // -- reading from image, command line inputs
  20. // 2010.01 Lukasz G. Szafaryn
  21. // -- arranged, commented
  22. // 2012.05 Lukasz G. Szafaryn
  23. // -- arranged
  24. // 2012.05 Lukasz G. Szafaryn
  25. // -- converted from CUDA to OpenCL
  26. //======================================================================================================================================================150
  27. // DESCRIPTION
  28. //======================================================================================================================================================150
  29. // The Heart Wall application tracks the movement of a mouse heart over a sequence of 104 609x590 ultrasound images to record response to the stimulus.
  30. // In its initial stage, the program performs image processing operations on the first image to detect initial, partial shapes of inner and outer heart walls.
  31. // These operations include: edge detection, SRAD despeckling (also part of Rodinia suite), morphological transformation and dilation. In order to reconstruct
  32. // approximated full shapes of heart walls, the program generates ellipses that are superimposed over the image and sampled to mark points on the heart walls
  33. // (Hough Search). In its final stage (Heart Wall Tracking presented here), program tracks movement of surfaces by detecting the movement of image areas under
  34. // sample points as the shapes of the heart walls change throughout the sequence of images.
  35. // SRAD is one of the first stages of the Heart Wall application. SRAD (Speckle Reducing Anisotropic Diffusion) is a diffusion method for ultrasonic and radar imaging
  36. // applications based on partial differential equations (PDEs). It is used to remove locally correlated noise, known as speckles, without destroying important image
  37. // features. SRAD consists of several pieces of work: image extraction, continuous iterations over the image (preparation, reduction, statistics, computation 1 and
  38. // computation 2) and image compression. The sequential dependency between all of these stages requires synchronization after each stage (because each stage
  39. // operates on the entire image).
  40. //======================================================================================================================================================150
  41. // PAPERS
  42. //======================================================================================================================================================150
  43. // L. G. Szafaryn, K. Skadron, and J. J. Saucerman. "Experiences Accelerating MATLAB Systems Biology Applications." In Proceedings of the Workshop on Biomedicine
  44. // in Computing: Systems, Architectures, and Circuits (BiC) 2009, in conjunction with the 36th IEEE/ACM International Symposium on Computer Architecture (ISCA),
  45. // June 2009. <http://www.cs.virginia.edu/~skadron/Papers/BiC09.pdf>
  46. // Y. Yu, S. Acton, Speckle reducing anisotropic diffusion, IEEE Transactions on Image Processing 11(11)(2002) 1260-1270.
  47. // <http://people.virginia.edu/~sc5nf/01097762.pdf>
  48. //======================================================================================================================================================150
  49. // DOWNLOAD
  50. //======================================================================================================================================================150
  51. // Rodinia Benchmark Suite page
  52. //======================================================================================================================================================150
  53. // IMPLEMENTATION-SPECIFIC DESCRIPTION (OpenCL)
  54. //======================================================================================================================================================150
  55. // This is the OpenCL version of SRAD code.
  56. // In OpenCL version of this application, each stage is a separate kernel (due to synchronization requirements) that operates on data already residing in GPU memory.
  57. // In order to improve GPU performance, data was transferred to GPU at the beginning of the code and then transferred back to CPU after all of the computation stages
  58. // were completed in GPU. Some of the kernels use GPU shared memory for additional improvement in performance. Speedup achievable with OpenCL version depends on
  59. // the image size (up to the point where GPU saturates).
  60. //======================================================================================================================================================150
  61. // RUNNING THIS CODE
  62. //======================================================================================================================================================150
  63. // Input image is generated by expanding the original image (image.pgm) via concatenating its parts. The original image needs to be located in the same folder as source files.
  64. // The following are the command parameters to the application:
  65. // 1) Number of iterations. Needs to be integer > 0.
  66. // 2) Saturation coefficient. Needs to be float > 0.
  67. // 3) Number of rows in the input image. Needs to be integer > 0.
  68. // 4) Number of columns in the input image. Needs to be integer > 0.
  69. // Example:
  70. // a.out 100 0.5 1000 1000
  71. // Running a.out without parameters will default to the parameters shown in the line above.
  72. //======================================================================================================================================================150
  73. // End
  74. //======================================================================================================================================================150
  75. //========================================================================================================================================================================================================200
  76. // End
  77. //========================================================================================================================================================================================================200