recap - compgeomcompgeom.com/~piyush/teach/3502/slides/week3w.pdf · animations in games or...
TRANSCRIPT
![Page 1: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/1.jpg)
Recap
![Page 2: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/2.jpg)
easy_install
• By now you should be able to install packages • py.test and coverage should be installed • Today, we will try to install pip and nose
• Understand paths
![Page 3: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/3.jpg)
While loops: Animation Process
Animations in Games or Graphics: while (not finished) {
MoveEverything(); DrawEverything();
}
![Page 4: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/4.jpg)
Introduction to Computer Vision
Computational Photography
![Page 5: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/5.jpg)
360 panorama
![Page 6: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/6.jpg)
CAP 5415: Computer Vision Xiuwen Liu
![Page 7: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/7.jpg)
1568
![Page 8: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/8.jpg)
Pinhole camera
• Add a barrier to block off most of the rays – This reduces blurring – The opening known as the aperture – How does this transform the image?
![Page 9: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/9.jpg)
Pinhole Camera
![Page 10: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/10.jpg)
Pinhole Photography
Image Size inversely proportional to Distance
Reading: http://www.pinholeresource.com/
©Charlotte Murray Untitled, 4" x 5" pinhole photograph, 1992
![Page 11: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/11.jpg)
Point of observation
Figures © Stephen E. Palmer, 2002
Dimensionality Reduction Machine (3D to 2D)
3D world 2D image
What have we lost? • Angles • Distances (lengths)
Slide by A. Efros
![Page 12: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/12.jpg)
Shrinking the aperture
![Page 13: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/13.jpg)
Adding a lens
• A lens focuses light onto the film – There is a specific distance at which objects are “in
focus” – Changing the shape of the lens changes this
distance
“circle of confusion”
Sensor Lens Object
![Page 14: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/14.jpg)
Aperture
![Page 15: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/15.jpg)
Aperture
© R. Mabry
![Page 16: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/16.jpg)
![Page 17: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/17.jpg)
Depth of Field
• Range of object distances over which image is sufficiently well focused.
http://images.dpchallenge.com/images_portfolio/27920/print_preview/116336.jpg
![Page 18: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/18.jpg)
3D Photography
• Replicate 3D objects, Make 3d Movies • Recognize 3D Structures
• Just an extension of pin hole camera concepts
![Page 19: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/19.jpg)
Main Concept
2x pinholes
![Page 20: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/20.jpg)
3D Vision: Self Driving Cars
Computer Vision Artificial Intelligence Machine Learning Pattern Recognition Other Applications: Face Recognition, Image Search, OCR, Remote Sensing …
![Page 21: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/21.jpg)
Back to Python
“It's the little details that are vital. Little things make big things happen.”
--Wooden
![Page 22: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/22.jpg)
Bubble Sort
Pseudocode: for i from 1 to N for j from 0 to N – i if a[j] > a[j + 1] swap( a[j], a[j + 1] )
![Page 23: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/23.jpg)
Bubble Sort
![Page 24: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/24.jpg)
Bubble Sort
In python: >>> arrNumbers=[5,4,3,2,1] ... n=len(arrNumbers) ... for i in range (1, n): ... for j in range (0, n - i): ... if( arrNumbers[j] > arrNumbers[j + 1]): ... temp = arrNumbers[j] ... arrNumbers[j] = arrNumbers[j + 1] ... arrNumbers[j + 1] = temp ... print arrNumbers [1, 2, 3, 4, 5]
![Page 25: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/25.jpg)
Selection Sort Pseudocode: For i = 0 to N-1 do: Smallsub = i For j = i + 1 to N-1 do: If A(j) < A(Smallsub) Smallsub = j End-If End-For Temp = A(i) A(i) = A(Smallsub) A(Smallsub) = Temp End-For
![Page 26: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/26.jpg)
Selection Sort
![Page 27: Recap - CompGeomcompgeom.com/~piyush/teach/3502/slides/week3W.pdf · Animations in Games or Graphics: ... Computational Photography . 360 panorama . CAP 5415: Computer Vision . Xiuwen](https://reader030.vdocuments.mx/reader030/viewer/2022021515/5b16a4507f8b9a6d6d8d0121/html5/thumbnails/27.jpg)
In python: >>> arrNumbers=[5,4,3,2,1] ... n=len(arrNumbers) ... for i in range(0,n): ... min =arrNumbers[i] ... min_indx=i ... for j in range(i+1,n) : ... if min > arrNumbers[j] : ... min =arrNumbers[j] ... min_indx=j ... temp=arrNumbers[min_indx] ... arrNumbers[min_indx]=arrNumbers[i] ... arrNumbers[i]=temp ... print arrNumbers [1, 2, 3, 4, 5]
Selection Sort