introduction to the csimageviewer. csimageviewer classes 1.mainprogram 2.csimageviewer 3.imagedata...
TRANSCRIPT
CSImageViewer classes
1. MainProgram2. CSImageViewer3. ImageData4. GrayImageData5. ColorImageData6. pnmHelper7. Timer
CSImageViewer classes
• MainProgram class– file: MainProgram.cs
– this class contains the Main() method
– do not use directly
CSImageViewer classes
• CSImageViewer class– file: CSImageViewer.cs
– instantiate this class to display an image
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1_c_s_image_viewer.html
CSImageViewer classes
• ImageData class– file: ImageData.cs
– class containing the actual pixel data values
– note that this class is abstract
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1_image_data.html
CSImageViewer classes
• GrayImageData class– file: GrayImageData.cs
– class containing the actual pixel data for a gray image (i.e., only one value per pixel)
– do not use directly
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1_gray_image_data.html
CSImageViewer classes
• ColorImageData class– file: ColorImageData.cs
– class containing the actual pixel data for a color image (i.e., 3 values per pixel - red, green, and blue (rgb))
– do not use directly
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1_color_image_data.html
CSImageViewer classes
• pnmHelper class– file: pnmHelper.cs
– this class contains methods that read and write PNM/PGM/PPM images (color rgb and grey images)
– do not use directly
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1pnm_helper.html
CSImageViewer classes
• Timer class– file: Timer.cs
– class containing timer (elapsed time) implementation
– You may use this class to time your implementation of various algorithms.
– refer to doxygen docs: http://www.sju.edu/~ggrevera/cscCV/CSImageViewer/CSImageViewer/CSImageViewer/html/class_c_s_image_viewer_1_1_timer.html
CSImageViewer classes• Timer class– Timer ()
• Timer class ctor.• Timer is started immediately.
– void reset ()• Reset/restart the time.• The timer continues to run.
– double getElapsedTime ()• Get the elapsed time (in seconds).• Note that this function does not start/stop/reset the timer. It
continues to run.– void report ()
• Report the elapsed time so far (using a modal dialog box).• While this dialog is up, the timer is paused and resumes when the
dialog is dismissed.
Summary of image data classes
• ImageData (abstract)– GrayImageData (don’t use directly)– ColorImageData (don’t use directly)
• pnmHelper (don’t use directly)
• So how do we use them to actually read in image data?
• Use Configuration Manager (Build --> Configuration Manager) to build either Release or Debug version.