git404hub

what is monocular-ranging-maixcam-stm32-tjc-screen fr?

ocfh/monocular-ranging-maixcam-stm32-tjc-screen — explained in plain English

Analysis updated 2026-05-18

55CAudience · developerComplexity · 4/5Setup · hard

tl;dr

A DIY vision system that uses a single smart camera to measure distance to an object, then shows the reading on a small serial screen via a microcontroller.

vibe map

mindmap
  root((repo))
    What it does
      Detects black shapes
      Measures distance
      Shows result on screen
    Tech stack
      Python
      OpenCV
      STM32
      TJC screen
    Use cases
      Embedded vision projects
      Distance sensing demos
      Student hardware builds
    Audience
      Electronics hobbyists
      Embedded students
    Setup
      Wire three devices
      Flash each device
      Calibrate with known object

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build a single camera distance sensor for a robotics or automation project.

VIBE 2

Learn how to send sensor data from a camera to a microcontroller over serial.

VIBE 3

Study a working example of camera to microcontroller to screen data flow.

VIBE 4

Use as a starting template for a custom embedded vision measurement tool.

what's the stack?

PythonOpenCVNumPySTM32Keil MDKUART

how it stacks up fr

ocfh/monocular-ranging-maixcam-stm32-tjc-screenalphapixel/eric-graham-1987-juggler-raytracer-1.0peng-zhihui/x-cube-usb-pd
Stars555456
LanguageCCC
Last pushed2018-02-14
MaintenanceDormant
Setup difficultyhardhardhard
Complexity4/52/55/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · hard time til it works · 1day+

Requires assembling and wiring three separate hardware devices and calibrating the distance formula physically.

The repository includes a LICENSE file but the explanation does not state its terms.

in plain english

This repository documents a hardware project that measures distance using a single camera, rather than two cameras or a laser sensor. It combines three components: a MaixCam smart camera running Python and OpenCV, an STM32 microcontroller, and a small serial touchscreen made by a company called Tojiang. The system detects a black rectangular object in the camera's view, works out its distance from the camera using triangle geometry, then sends that measurement over a serial cable to the microcontroller, which forwards it to the screen for display. On the camera side, the code isolates black shapes using color thresholding, filters out noise, and sorts the four corners of a detected shape so it can correct for tilt using a perspective transform. Once the shape is aligned, it calculates distance based on how large the object appears in pixels compared to its known real world size. To avoid overwhelming the microcontroller with data, the code only sends an update when the distance has been stable for over 200 milliseconds and the pixel width has changed by more than 3 pixels, filtering out small jitters. Data travels between devices using a small custom text protocol that looks like $D:distance,W:width,H:height#, with a dollar sign marking the start of a message and a hash mark ending it, making it easy for the microcontroller to find message boundaries in a stream of serial data. The STM32 firmware listens for these messages over UART, parses out the numbers, and checks that they are valid before passing them along to the screen. The project folder is organized into a working camera test area, the finished camera script, the STM32 firmware project for Keil, the screen design files, and a folder of photos showing the assembled hardware. Setup requires physically wiring the camera, microcontroller, and screen together, flashing code to each device separately, and calibrating the measurement formula using a known object and a known distance beforehand. It is aimed at electronics hobbyists and students building embedded vision systems rather than general software developers, and assumes familiarity with microcontroller development tools.

prompts (copy fr)

prompt 1
Explain how the perspective transform in this MaixCam project corrects a tilted object before distance is measured.
prompt 2
Help me adapt the $D:W:H# serial protocol in this project to send an extra sensor value.
prompt 3
Walk me through wiring a MaixCam, an STM32F103, and a TJC serial screen together like this project does.
prompt 4
Show me how to recalibrate the FOCAL_LENGTH value in this repo for a different camera lens.

Frequently asked questions

what is monocular-ranging-maixcam-stm32-tjc-screen fr?

A DIY vision system that uses a single smart camera to measure distance to an object, then shows the reading on a small serial screen via a microcontroller.

What language is monocular-ranging-maixcam-stm32-tjc-screen written in?

Mainly C. The stack also includes Python, OpenCV, NumPy.

What license does monocular-ranging-maixcam-stm32-tjc-screen use?

The repository includes a LICENSE file but the explanation does not state its terms.

How hard is monocular-ranging-maixcam-stm32-tjc-screen to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is monocular-ranging-maixcam-stm32-tjc-screen for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.