Giter Site home page Giter Site logo

purehing / k210-camera-project Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 6.0 304 KB

This is a simple project for k210 with drivers of different camera type,support save image to sd-card by jpeg or bmp.

License: Apache License 2.0

CMake 4.00% C 91.05% Objective-C 1.61% Makefile 0.02% Shell 0.02% Python 3.31%
k210 ov2640 ov5640 gc0328 sd-card-image object-detection yolo

k210-camera-project's Introduction

k210-camera-project

This is a simple project for k210 with drivers of different camera type,support save image to sd-card by jpeg or bmp.

Get source code

  • Clone by https link
git clone https://github.com/PureHing/k210-camera-project.git
  • Then get submodules
git submodule update --recursive --init

It will regiter and clone all submodules, if you don't want to register all submodules, cause some modules is unnecessary, just execute

git submodule update --init
# or 
git submodule update --init path_to_submodule
# or
git submodule update --init --recursive path_to_submodule

Install dependencies

Ubuntu for example:

sudo apt update
sudo apt install python3 python3-pip build-essential cmake
sudo pip3 install -r requirements.txt

recommend python3 instead of python2

Check CMake version by

cmake --version

The cmake version should be at least v3.9, if not, please install latest cmake manually from cmake website

Download toolchain

Download the latest toolchain from here, or kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz(CDN)

And extract to /opt/kendryte-toolchain/

For example:

wget http://dl.cdn.sipeed.com/kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz
sudo tar -Jxvf kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz -C /opt
ls /opt/kendryte-toolchain/bin

Configure project

  • Switch path to testproject project director
cd projects/testproject

or

cd projects/dvp2lcd
  • Configure toolchain path

The default toolchain path is /opt/kendryte-toolchain/bin, and default toolchain pfrefix is riscv64-unknown-elf-.

If you have copied toolchain to /opt, just use default.

Or you can customsize your toolchain path by

python project.py --toolchain /opt/kendryte-toolchain/bin --toolchain-prefix riscv64-unknown-elf- config 

And clean config to default by command

python project.py clean_conf
  • Configure project

Usually, just use the default configuration.

If you want to customsize project modules, execute command:

python3 project.py menuconfig

This command will display a configure panel with GUI, then change settings and save configuration.

Build

python3 project.py build

And clean project by:

python3 project.py clean

Clean all build files by:

python3 project.py distclean

The make system is generated from cmake, you MUST run

python3 project.py rebuild

to rebuild make system after you add/delete source files or edit kconfig files

Flash (Burn) to board

For example

python3 project.py -B dan -p /dev/ttyUSB0 -b 1500000 -S flash
or
./download2board.sh

-B means board, -p means board serial device port, -b means baudrate, -S or --Slow means download at low speed but more stable mode.

the configuration saved in .flash_conf.json except args: --sram(-s)ใ€--terminal(-t)ใ€--Slow(-S) You don't need to confiure again the next time you burn firmware, just use:

python3 project.py flash

or

python3 project.py -S flash

More parameters help by :

python3 project.py --help

Others

Build system: refer to c_cpp_project_framework and MF1-SDK

k210-camera-project's People

Contributors

purehing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

k210-camera-project's Issues

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.