+ All Categories
Home > Documents > CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · ©...

CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · ©...

Date post: 23-Jul-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
7
© Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January 30, 2015 © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 Recall – “Hello World” Equivalent
Transcript
Page 1: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

OpenCV Basics

Lecture #4 January 30, 2015

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Recall – “Hello World” Equivalent

Page 2: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

… and when run locally …

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Next up … Images

Page 3: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

MAT as of OpenCV 2.0 (and up) •  Memory management handled for us. •  A tremendous amount of information hiding. •  All and all – a good thing. •  All common types supported

– Gray scale – Color (RGB, HSV, ..) –  In case you wondered:

•  “There are more than 150 color-space conversion methods available in OpenCV.”

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Tutorial 2

Further  prac+ce  reading,  wri+ng  and  now  modifying  images.  

Page 4: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Tutorial 3 – Printing (a few) pixels

FYI  –  Pixels  from  the  center  of  the  right  eye.  

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Tutorial 4 – Changing Pixels

Page 5: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Some Observations

•  Pixels are shared between two Mat objects.

•  Iterators simplify access.

•  A color image consists of 3 channels. – Hence, the Vec3b usage

•  Why is the 3rd channel set to 255 – The goal is to give the Red Panda red eye.

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Tutorial 5 – Affine Transforms •  We return to image warping, but now making

it happen in OpenCV

Page 6: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Before and After Points

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Make it so … Recall,  this  is  what  we  discussed  about  2  lectures  ago  when  we  used  before/aBer  representa+ons  of  3  2D  points  to  define  a  6DOF  transform.  

Page 7: CS510 L04 OpenCV Basic01 - Colorado State Universitycs510/yr2015sp/more_progress/CS51… · © Bruce A. Draper & J. Ross Beveridge, January 30, 2015 OpenCV Basics Lecture #4 January

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Warp then Rotate Pay  aHen+on  to  the  center  of  rota+on.  

© Bruce A. Draper & J. Ross Beveridge, January 30, 2015

Homework 1 – Find a Tutorial

•  Use the CS 510 online notes to enter your selection below. •  Avoid those already taken, and please include a URL.


Recommended