Zirui Zang and the F1TENTH Team
Contact: Rahul Mangharam <rahulm@seas.upenn.edu>
Portions of these slides are from Penn Course MEAM620, CIS680
F1TENTH Autonomous Racing
�Vision I : Classical Methods
Vision Module Overview
Lecture 1 : Classical Methods
Lecture 1I : DL Methods
Vision Hardware
Vision Sensors - Cameras
Vision Sensors - Lidar
“Image” from one dense 3D lidar scan
Intel Realsense D435i
Let’s read its spec.
And see why do they provide these spec.
Camera Spec - Shutter Type
Rolling
Global
Camera Spec - Sensor Size & Pixel Size
iPhone 12 Pro Max marketing, but it’s true
Camera Spec - FOV
Camera Spec - Connector
Camera Serial Interface (CSI) Connector
Ethernet
USB
CSI Camera
Image Signal Processor (ISP)
new Snapdragon 8 Gen 1 chipset offers 18-bit triple-ISP design
Accessing Camera on Linux
ls /dev/video*
16-bit Depth Map
IR Image
RGB Image
v4l2src
v4l2-ctrl -d /dev/video2 --list-ctrl-menus
v4l2-ctrl -d /dev/video2 --list-formats-ext
Camera Model & Calibration
Image - Camera - World
Image pixel coordinates Camera coordinates World coordinates
Camera Intrinsics
Camera Extrinsics
Scale factor
Camera Intrinsics
Focal length (pixels)
Image Center Shift (pixels)
Camera Extrinsics
Intrinsics & Extrinsics
Here X and Y are flipped, but it’s equivalent.
Get Intrinsics - Camera Calibration
Camera Matrix
Get Extrinsics - Computing a Transformation
Camera - Image Frame
Distance Estimation
Zcar
Xcar
Ycar
Distance Estimation
We can add more corresponding points to solve for any missing variable.
Detection with OpenCV
Useful for doing the vision lab.
Edge & Blob Detection
cv2.Canny
detector = cv2.SimpleBlobDetector()
keypoints = detector.detect(img)
Parameters for the SimpleBlobDetector
HSV color space
HSV color space
Hue value
Example: lawn detection
Used function:
cv2.GaussianBlur
Used function:
cv2.cvtColor
cv2.threshold
Used function:
cv2.connectedComponentsWithStats
Used function:
cv2.dilate
cv2.erode
Feature Extraction
2D Convolution
Some Classical Feature Extraction Methods
Shi-Tomasi Corner Detector:
cv2.goodFeaturesToTrack()
SIFT (Scale-Invariant Feature Transform):
sift = cv2.SIFT_create()
kp = sift.detect()
ORB (Oriented FAST and Rotated BRIEF):
orb = cv2.ORB_create()
kp = orb.detect()
kp, des = orb.compute()
By matching these features between frames, we can track object, classically.
Put it together
https://introlab.github.io/rtabmap/
Visual SLAM
Visual SLAM Framework
ORB-SLAM2
Bundle Adjustment
Consider many points
Consider many points and cameras
is 0 when point i is not seen by camera j
When the projection is arbitrary
Challenges in Visual SLAM
ORB-SLAM
References