Giter Site home page Giter Site logo

phylumchordata / esp32_stereo_camera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jonathanrandall/esp32_stereo_camera

1.0 1.0 0.0 1.09 MB

stereo camera files for esp32

License: MIT License

C++ 1.30% Python 0.70% Jupyter Notebook 97.99%

esp32_stereo_camera's Introduction

esp32_stereo_camera

stereo camera files for esp32

Youtube video at: https://youtu.be/CAVYHlFGpaw

The code implements the stereo camera for object detection, labelling and distance estimation with the esp32.

The notebooks are:

  1. stereo_image_v6.ipynb: this is for calibrating the camera.
  2. esp32_stereo_cam.ipynb: this connects to the cameras and does the inference.

The sketch in esp32_webcam can be used to run the camera (although not properly tested) if you can't get the "CameraWebServer" sketch to compile. Note, the CameraWebServer sketch might not compile in newer esp32 board managers (?=2.x.x).

If you want to use any stream handler from another sketch with python, you need to do the following:

Find the following code in the stream handler:

if(res == ESP_OK){  
      size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);      
      res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);      
  }
  if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
  }
  if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
  }
  ```
  
And copy the bottom statement (_STREAM_BOUNDAEY) to the top:
 if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
  }
 if(res == ESP_OK){
      size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
      res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
  }
  if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
  }

esp32_stereo_camera's People

Contributors

jonathanrandall avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.