91.204.201 computing iv introduction xinwen fu. cs@uml by dr. xinwen fu2 2 about instructor dr....

23
91.204.201 Computing IV Introduction Xinwen Fu

Upload: archibald-rose

Post on 28-Dec-2015

230 views

Category:

Documents


1 download

TRANSCRIPT

91.204.201 Computing IV

Introduction

Xinwen Fu

CS@UMLBy Dr. Xinwen Fu 2By Dr. Xinwen Fu 2

About Instructor Dr. Xinwen Fu, associate professor of

CS@UML Homepage: http://www.cs.uml.edu/~xinwenfu/ Email: [email protected] Phone: (978) 934-3623 Office: 203 Olsen Hall Office hours:

Mon, Wed. MW. 3:30PM ~ 5:00PM or by appointment

CS@UMLBy Dr. Xinwen Fu 3

About TA TBD

  Office hours:

TBD

CS@UMLBy Dr. Xinwen Fu 4

Textbook and Handouts Required textbook (not released yet)

Gary Bradski, and Adrian Kaehler, Learning OpenCV: Computer Vision in C++ with the OpenCV Library, O'Reilly Media; Second Edition edition, December 25, 2012, ISBN-10: 1449314651, ISBN-13: 978-1449314651

Textbook replacement The OpenCV Tutorials Release 2.4.3 at

http://docs.opencv.org/opencv_tutorials.pdf

CS@UMLBy Dr. Xinwen Fu 5

Course Objectives Master OpenCV++ Master Visual C++ Master Debugging with Visual C++ Master selected design patterns

CS@UMLBy Dr. Xinwen Fu 6

Course Styles Descriptive: what is out there Critical: what is wrong with ... Both knowledge and skill oriented Interactive: discussion and questions

encouraged Information sharing: home page and

message board in Blackboard

CS@UMLBy Dr. Xinwen Fu 7

Tentative Course Outline1. Introduction to OpenCV

VC++ 2010 examples

2. OpenCV core module. The Core Functionality Basic building blocks of the library Manipulate the images on a pixel level.

3. imgproc module. Image Processing4. highgui module. High Level GUI and Media

Read/save image/video files Use built-in graphical user interface

5. calib3d module. Camera calibration and 3D reconstruction

Find out from 2D images information about 3D world

CS@UMLBy Dr. Xinwen Fu 8

Lab Exercises Location

Open labs on the third floor Time

24/7

CS@UMLBy Dr. Xinwen Fu 9

Prerequisites 91.201 Computing III 91.203 Computer Organization and

Assembly Language

CS@UMLBy Dr. Xinwen Fu 10

Grading

I reserve the rightto change thisdistribution during the course after notification

The final grades arecomputed accordingto the following rules

Attendance 10%Assignments (5~10) 30%Midterm Exam 20%Final Exam 20%Term Project 20%

CS@UMLBy Dr. Xinwen Fu 11

Policies on incomplete grades and late assignments Turn in assignments on or before the due date

and time What if the campus network is down?

An assignment turned in up to 24-hours late will be reduced by 10% of the assignment’s worth, more than 24 hours late will be reduced 100%

The due date and time for each assignment will be specified on assignment postings

All assignments are to be turned in through Blackboard (https://login.umassonline.net/lowell.cfm)

CS@UMLBy Dr. Xinwen Fu 12

Policies on absences and scheduling makeup work

Make-up exams will only be given in case of serious need and only when the instructor is notified prior to the exam time. If this is not done, the grade is automatically zero for that exam

Written verification for the student’s inability to take an exam will be required

The make-up exams will be different from those given to the class

CS@UMLBy Dr. Xinwen Fu 13By Dr. Xinwen Fu 13

Academic Integrity Finish assignments individually and independently except

notified. Should two or more students turn in substantially the same solution or program, in the judgment of the instructor, the assignment will be given a grade of zero. A second such incident will result in an F grade for the course

All forms of academic dishonesty will result in an F for the course and notification of the Academic Dishonesty Committee http://www.departments.dsu.edu/student_services/

handbook/

Copy from the Internet is not allowed

Advice: put away the references and use your own language

CS@UMLBy Dr. Xinwen Fu 14By Dr. Xinwen Fu 14

Policy on working with students with disabilities

The University is committed to serving all students with disabilities as defined by the Rehabilitation Act of 1973 and the Americans with Disabilities Act of 1990. A qualified person with a disability means: an individual with a disability who, with or without reasonable modifications to rules, policies, or practices, the removal of architectural, communication or transportation barriers, or the provision of auxiliary aids and services, meets the essential eligibility requirements for the receipt of services or the participation in programs or activities provided by a public entity.

Questions concerning services for people with learning and physical disabilities should be directed to

Jody Goldstein, MSSWStudent Disability ServicesOne University AvenueCumnock Hall C6Lowell, MA 01854978-934-4574E-mail: [email protected]

http://www.uml.edu/STUDENT-SERVICES/disability/default.html

CS@UMLBy Dr. Xinwen Fu 15

Check Blackboard for details!

CS@UMLBy Dr. Xinwen Fu 16

A Survey (No Credit)1. What are the values of a and b?

2. What is polymorphism?

main(){

int a=0, b;

b=a++;printf(“a=%d; b=%d”, a, b);

}

CS@UML

Polymorphism One of the key features of derived classes

is that a pointer to a derived class is type-compatible with a pointer to its base class

Polymorphism is the art of taking advantage of this simple but powerful and versatile feature, that brings Object Oriented Methodologies to its full potential

By Dr. Xinwen Fu 17

CS@UML

Example1. // pointers to base class2. #include <iostream>3. using namespace std;

4. class CPolygon {5. protected:6. int width, height;7. public:8. void set_values (int a, int b){ width=a; height=b; }9. virtual int area () =0;10. };

11. class CRectangle: public CPolygon {12. public:13. int area ()14. { return (width * height); }15. };

By Dr. Xinwen Fu 18

CS@UML

16. class CTriangle: public CPolygon {17. public:18. int area ()19. { return (width * height / 2); }20. };

21. int main () {22. CRectangle rect;23. CTriangle trgl;

24. rect.set_values (4,5);25. trgl.set_values (4,5);

26. CPolygon * ppoly = &rect;27. cout << ppoly->area() << endl;

28. ppoly = &trgl;29. cout << ppoly->area() << endl;

30. return 0;31. }

By Dr. Xinwen Fu 19

CS@UML

namespace Namespaces allow to group entities like classes,

objects and functions under a name. This way the global scope can be divided in "sub-scopes", each one with its own name.

The format of namespaces is:1. namespace identifier2. {3. entities4. } Where identifier is any valid identifier and entities is

the set of classes, objects and functions that are included within the namespace. For example:

By Dr. Xinwen Fu 20

CS@UML

Example1. // namespaces2. #include <iostream>3. using namespace std;

4. namespace first5. {6. int var = 5;7. }

8. namespace second9. {10. double var = 3.1416;11. }

12. int main () {13. cout << first::var << endl;14. cout << second::var << endl;15. return 0;16. }

By Dr. Xinwen Fu 21

CS@UML

Example – using namespace1. // namespaces2. #include <iostream>3. using namespace std;

4. namespace first5. {6. int var = 5;7. }

8. namespace second9. {10. double var = 3.1416;11. }

12. int main () {13. cout << first::var << endl;14. cout << second::var << endl;15. return 0;16. }

By Dr. Xinwen Fu 22

CS@UML

1. // namespaces2. #include <iostream>3. using namespace std;

4. namespace first5. {6. int var = 5;7. }

8. namespace second9. {10. double var = 3.1416;11. }

12. using namespace first;13. //using namespace second;

14. int main () {15. cout << var << endl;16. cout << var << endl;17. return 0;18. }

By Dr. Xinwen Fu 23