Skip to content

BurenkovS/portenta_h7_stereo_camera_shield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

Stereo Camera Shield for Arduino Portenta H7

Project description

Stereo camera aka binocular camera shield for Arduino portenta H7. Shield is build on pair of MT9V034 monochrome imaging sensors with global shutter and high dynamic range (HDR) operation. Image processing is performed by Gowin GW2AR FPGA with embedded SDRAM.

h7sterecam1

Global shutter allow to capture images not affected by motion blur. All this make camera module perfect for professional machine vision applications. Gowin GW2AR FPGA have enough resources not only for simple image stitching, but also for comlex preprocessing. Some functions as sensors rectification, filtering, morphological transformations and so on may be implemented in the future.

h7sterecam1 h7sterecam1

RISC-V soft-cpu inside FPGA is used for communication with image sensors and Arduino Portenta board.

h7sterecam1

Here is simplified example of distance measurement based on blob detection algorithm, implemented in OpenMV framework:

1.mp4

Features

  • MT9V034 image sensors (monochrome, global shutter, HDR)
  • Gowin GW2AR FPGA with RISC-V soft-cpu core inside
  • SD card

Operation

Shield is controlled by I2C interface. 16-bitwidth address and 16-bitwidth data is using. There is 4 address spaces inside:

  • 0 - internal FPGA processor registers. Using for control common camera functions
  • 1 - direct access to MT1 image sensor i2c registers
  • 2 - direct access to MT2 image sensor i2c registers
  • 3 - simultaneously write to both MT1 and MT2 sensors (not tested yet)

Number of address space passed in high 8 bits of i2c address, number of register to write is passed in low 8 bits of address. For example, to write data to MT2 register 0x35(analog gain) user should provide i2c address as 0x0235.

Internal FPGA processor registers :

NAME OFFSET DESCRIPRION
CAM_EXPOSURE_REG_LOW 0x80 Low 16 bits of exposure(in 27Mhz ticks)
CAM_EXPOSURE_REG_HIGH 0x82 High 16 bits of exposure(in 27Mhz ticks)
CAM_FRAME_WIDTH 0x84 Frame width(single image width)
CAM_FRAME_HEIGHT 0x86 Frame height(single image width)

When writing to CAM_FRAME_WIDTH or CAM_FRAME_HEIGHT, internal registers will update and also necessary registers of MT1 and MT2 will configure image size and offsets to allign image to the center of pixels array. The result image, which will stream to Portenta will have 2xCAM_FRAME_WIDTH width.

About

Stereo Camera Shield for Arduino Portenta H7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published