Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming language – C++ Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University.

Similar presentations


Presentation on theme: "Programming language – C++ Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University."— Presentation transcript:

1 Programming language – C++ Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 21 October 2003 Chapter 3

2 Introduction  Useful materials for learning C++ C C++ course Free electronic book: Think in C++Think in C++ Teach yourself C++ in 21 days Reference library

3 Microsoft Visual Studio environment  Start a new project  Add a new c++ file  Compile  Debug  Run  Change the attribute

4 Six basic elements of programming language  Basic structure of a C program (ex3-1) (ex3-1  Data type (ex3-2) ex3-2  Input/output (ex3-3) ex3-3  Operator (ex3-4) (ex3-4  Control (ex3-5, ex3-6) ex3-5ex3-6ex3-5ex3-6  Array (ex3-7, ex3-8) ex3-7ex3-8ex3-7ex3-8  Function (ex3-9) ex3-9

5 New features of C++  Class (ex3-10.cpp, ex3-10.hpp) ex3-10.cppex3-10.hppex3-10.cppex3-10.hpp  Pointer (ex3-11.cpp) ex3-11.cpp  Reference (ex3-12.cpp, ex3-13.cpp) ex3-12.cppex3-13.cppex3-12.cppex3-13.cpp  Inheritance (ex3-14.cpp, ex3-15.cpp, ex3-16.cpp, ex3-17.cpp, ex3-18.cpp, ex3-19.cpp) ex3-14.cppex3-15.cpp ex3-16.cppex3-17.cppex3-18.cpp ex3-19.cppex3-14.cppex3-15.cpp ex3-16.cppex3-17.cppex3-18.cpp ex3-19.cpp

6 Homework 3  Convert your homework 1 (Fortran version) to C++ version

7 Homework 4  Modify the source code (Homework4.cpp) and write a member function Histogram to calculate the histogram of the input image (image.txt). Please output to a file “histogram.txt” with two columns: Grey level and Pixel numbers. Homework4.cppimage.txtHomework4.cppimage.txt


Download ppt "Programming language – C++ Digital Image Processing Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University."

Similar presentations


Ads by Google