HowTo: Use RICOH THETA SC2 with OpenCV for Object Detection and Edge Detection

I recently saw a question on GitHub about getting a stream from an SC2 to a computer for processing by an application.

As the SC2 uses a different OS from the V, Z1, and X, it is not possible to stream over a USB cable.

However, it may be possible to use livePreview motionjpeg.

I previously wrote about this technique here:

https://community.theta360.guide/t/preview-mjpeg-stream-on-a-ricoh-theta-x-with-python-and-opencv/8919/11?u=craig

At the time, I only tested it with an X.

I decided to test it with a RICOH THETA SC2.

git clone git@github.com:codetricity/ricoh_theta_mjpeg_opencv.git

Setup Python virtual environment and install dependencies.

python -m venv venv
source venv/bin/activate
pip install requests
pip install requests.auth
pip install numpy
pip install opencv-python

run

python main.py