Skip to content

UCSolarCarTeam/BackupCamera

Repository files navigation

Steps to Setup Proper Camera Streaming Environment on a Fresh SD Card

  1. Run MainInstaller.sh as root (found in the installer directory).

  2. Run AutobootSetup.sh as root (found in the installer directory).

  3. Run "tvservice -d edid" from the terminal followed by "edidparser edid".

  4. Find the preferred screen resolution / refresh rate from the list, look for HDMI:EDID DMT or CEA mode.

  5. Open /boot/config.txt as root. Uncomment out hdmi_group and hdmi_mode. If the reolution was CEA, write a 1 for group, if it was DMT write 2 Write the number in brackets after the mode for hdmi_mode.

    i.e) if you see:

    HDMI:EDID best score mode is now DMT (27) 1280x800p @ 60 Hz with pixel clock 71 MHz (score 5184320)

    Then write 2 for hdmi_group and 27 for mode for a result of:

    # uncomment to force a specific HDMI mode (this will force VGA)
    hdmi_group=2
    hdmi_mode=27
  6. Save the file and reboot the pi.

Compiling and Running the Program

  1. After cloning the repository, navigate to the installer directory: cd Installer

  2. Run the MainInstaller.sh script as root: sudo ./MainInstaller.sh

  3. Generate the executable with make -j4, -j4 will decrease the compile time by using 4 threads, this number can be increased depending on how many threads are adequate

  4. The program should now run with ./BackupCamera

    • The program currently takes 6 command line arguments: 2 for window position (x, y), 2 for window size (x, y) and 2 for camera resolution

    • For example try: ./BackupCamera 100 100 100 100 100 100

Setting Up a Webcam in the VM

  1. Install Oracle VM VirtualBox Extension Pack (Provides support for USB 2.0, 3.0)

    • Be sure to install the extension pack that matches the version of Virtual Box you are running

    • Launch Oracle VirtualBox Manager and navigate to FilePreferences

    • In the Preferences window, select Extensions

    • Press Add new package and add your extension pack if it isn’t already there

  2. Launch the guest OS (your VM)

  3. Launch command prompt on your host OS

    • cd into where the VirtualBox folder is located

      • Example file path may be: cd c:\Program Files\Oracle\VirtualBox

    • List the available cameras using the command VBoxManage list webcams

      • The available webcams should be listed using ".x webcamName"

    • Next run the command VBoxManage controlvm "<yourVirtualMachineName>" webcam attach <.x>

Further Reading

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published