open cv lecture 2.opencv_about_mat_r2

23
OpenCV Lecture #2. About Mat Class MareArts

Upload: jeonghyun-kim

Post on 12-Apr-2017

210 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Open cv lecture 2.opencv_about_mat_r2

OpenCV Lecture#2. About Mat Class

MareArts

Page 2: Open cv lecture 2.opencv_about_mat_r2

Mat and Image, Video Image Reading

KeyCode :http://study.marearts.com/2016/11/keycode-and-ascii-code.html

Video reading :http://study.marearts.com/2013/09/opencv-video-file-load-and-display.html

Video Reading

Page 3: Open cv lecture 2.opencv_about_mat_r2

Mat and Image Image related functions

http://study.marearts.com/2016/06/opencv-mat-copyto-clone-roi-example-code.htmlExample code:

Page 4: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel access Image Reading And Pixel Access in Mat 1. using ‘at’

Safety but most slow2. using ‘ptr’

Faster than ‘at’3. using ‘data’

Fastest but unsafety

* Refer at, ptr, data, iteration example code tohttp://study.marearts.com/2014/04/opencv-study-mat-point-access-method.htmlhttp://study.marearts.com/2016/06/opencv-pixel-access-at-ptr-data.html

Page 5: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel accessat case

Page 6: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel accessptr case

Page 7: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel accessdata case

Page 8: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel accessSTL iteration case

Input & output

Page 9: Open cv lecture 2.opencv_about_mat_r2

Mat and Pixel accessAssignment #1

Make color invert in each region in video image A : use ‘at’ operator A : use ‘ptr’ operator A : use ‘iterator’ operator A : use ‘data’ operator※ Region’s position and scale is free.

AB

C D

Video

Page 10: Open cv lecture 2.opencv_about_mat_r2

Mat and Image, video write Image write

Page 11: Open cv lecture 2.opencv_about_mat_r2

Mat and Image, video writevideo write

http://study.marearts.com/2013/09/opencv-video-writer-example-source-code.html

Page 12: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixWe learned that in previous lesson

Mat creation and simple matrix operationLet’s look in more detail

Page 13: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixMatrix operations

http://study.marearts.com/2016/06/opencv-mat-and-matrix-operation-examples.html

Page 14: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixElementwise matrix operations

Page 15: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixVector products

Page 16: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixSingle matrix operations

Page 17: Open cv lecture 2.opencv_about_mat_r2

Mat and Matrix Inhomogeneous linear system solver

Page 18: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixEigen analysis

Page 19: Open cv lecture 2.opencv_about_mat_r2

Mat and MatrixSVD example

Page 20: Open cv lecture 2.opencv_about_mat_r2

Mat and gpuMatCuda example

Page 21: Open cv lecture 2.opencv_about_mat_r2

Mat and gpuMatAssignment #2

To use over 20 functions related to the GpuMatCreate example code

Page 22: Open cv lecture 2.opencv_about_mat_r2

Bonus Assignment #1The bomb removing gameSquare box comes down slowly from top to bottom.Square box size and position is random.When a user clicks on a box, box is eliminated.And score is increase. But if the box is touching the floor loses the score.

Page 23: Open cv lecture 2.opencv_about_mat_r2

Thank you.See you laterDo not forget your assignment!! I will miss you very much!!

Gyeongju, Anapji