Skip to content
johnylamw edited this page Aug 12, 2023 · 22 revisions

FRC488 - Computer Vision (Mock) Curriculum

Start Here:

Highly recommend reading everything but here is a a TL;DR guide to navigating this page:

Beginner: Command-Line

The command-line is especially important to learn for development because we compile our tools and code via the command-line. We can, however, use an editor/IDE like VS Code, PyCharm, or Eclipse to compile code but that requires a lot of set up to get it right. Even with that, some implementations would require specially tuned parameters/arguments that needs to be supplied to the command-line in which the IDE cannot do.

For example, our MainReactor program can be ran differently based on what arguments is specified to the terminal:

  • > ./main_reactor is a single argument command which will print out the proper command-line usage of MainReactor. So, it will print to the screen with instructions on how to use the program. Ex: ./main_reactor config[:name][@source]
  • > ./main_reactor rs_color would initialize the program to run with RealSense Color (rs_color) cameras
  • > ./main_reactor rs_color rs_depth would initalize the program to run with RealSense Color (rs_color) and RealSense Depth (rs_depth) cameras.
  • > ./main_reactor dai_color dai_depth would initialize the program to run with DepthAI Color and DepthAI Depth cameras.

Note: All these are program specific and the arguments varies based on how the code is written. rs_color, rs_depth, dai_color dai_depth` are how we configured our presets for the code to run. Not ALL code requires multiple arguments to be specified.

So, it's important to learn how to type in the terminal and basics terminal navigation.

TL;DR If you want to learn the command-line, a great resource would be Command Line Basics by The Odin Project which supplements readings from The Unix Shell.

  • For The Unix Shell, the Odin Project recommends working through the first 4 modules but Module 4: Pipes and Filters can be skipped for now.

Beginner: Git & GitHub

In short, Git is used for source code management. It allows us to store code and track changes that are made to the it. Additionally, it allows us to work on code collaboratively and on different devices. Git is the version control system that manages the source code whereas GitHub is the cloud-based hosting services that allows for repostitory management.

  • Bad and inaccurate example but in simpler terms, Github is essentially a Google Drive but designed for coding. You can store documents on the cloud, share your documents with other people, view the editing history.. etc.

Git Basics by The Odin Project or Complete Git and Github Tutorial (Video) or Pro Git Book by Scott Chacon are all great resources for learning Git. Pick your poison.

After learning the basics, some important git fundamentals to learn would be:


Debugging Git Resource: Oh Shit, Git!?!


Beginner: Learning Python

If you are new to programming or new to the Python language and want to learn it, a great beginner resource would be Automate The Boring Stuff With Python and Python MOOC by University of Helsinki.

Personal advice is to not be overwhelmed by what resource to use but rather to just pick one and stick with it.


Beginner: Learning Python (w/ Programming Experience)

If you are transitioning from Core Programming or have pre-existing knowledge of programming languages such as Java and want to learn Python without consulting any new tutorials or code, you can consider learning as you think in Java syntax/concepts and translate it into Python through googling how to do certain things the Python way. Programming concepts stay the same no matter which language you are using; the main differences between languages are syntaxes and the levels of abstractions.

For example, you can try searching:

  • How to write a Python array
  • What is String.toString() in Python
  • How to convert a string to an integer in Python

If you want to jump straight into the Pythonic world, I would recommend checking out the Official Python Documentation Tutorials and its Documentations.


Programming Q&A and Overview:

Why are we using Python?

  • In terms of using Python for Computer Vision processing, we use it for prototyping our ideas since Python is extremely easy to write code and prototyping ideas compared to the popular counterpart of C++ which requires a lot of error handling and complicated syntaxes.
  • There are also a lot of libraries and resources written for Computer Vision using the Python language.

Can I use C++ instead?

  • Yes. Normally, we first prototype in Python and if speed is an issue, we will rewrite it into C++. However, if you want a challenge and try using C++, by all means, go for it.

Computer Vision Curriculum:

TODO: Add code to the repository of example code such as image manipulations, using apriltags, camera calibrations.. etc. and add links to the resources or write our own tutorial. NOTE: WORK IN PROGRESS - STILL NEEDS MORE WORK.

  1. Introduction to Images

    • Pixels, Image Manipulation, Color Space
    • Grayscale, RGB, HSL, HSV
  2. Introduction to Cameras

    • Lens (Regular, Fisheye)
    • Pinhole Cameras
    • What cameras do the team use?
  3. OpenCV Basics

    • Loading, displaying and saving images
    • Capturing video from camera frames
    • Annotating mats: drawing shapes, text
    • Image operations: pixels, properties (shape, data type), resizing
    • Bitwise operations
    • Changing ColorSpace
  4. Computer Vision Basics

    • Transformations
    • Kernels and Convolution
  5. AprilTags (and PhotonVision?)

  6. Camera Calibration

  7. Object Detection (Python Example (488-2023)

    • Histogram, Morphology.. etc

Other CV Topics:

  1. Getting an object's depth and angle from center of the camera
  2. Robot arm kinematics

XBOT Internal Tools:

  1. MainReactor
  2. MRC Histogram Creation GUI tool

FRC Topics:

  1. NetworkTables

Resource Dump: CV Curriculums:

Here are a list of Computer Vision curriculums/resources that are found online (but yet to be verified):


Intermediate: C++

C++ is generally much more complicated than Python but it offers the speed and performance that beats Python and is also considered one of the fastest programming languages as it is statically typed versus Python's dynamically typed language.

Speed is especially important for applications of Computer Vision since cameras will usually capture at framerates starting from 20 frames per second up to 400+ frames. It would be optimal for our code to process the data as fast as the cameras can process it.

If you want to learn C++ from the ground up, learncpp is the best place for covering both beginner and advanced C++ topics and that follows modern and best practice guidelines.

C++ Reference Page