1 Star 0 Fork 4.9K

Sharlen / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
use-case.md 3.44 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

Use Case

  • For details about the development board, compilation, burning, and image running, see Getting Started with Hi3518. A compilation result file of sample code is stored in out/ipcamera_hi3518ev300/dev_tools/bin/camera_sample. You can copy the file to a TF card, or modify the compilation script of camera_sample to copy the result to rootfs.img.

    Modify output_dir in applications/sample/camera/media/BUILD.gn.

    • Before: output_dir = "$root_out_dir/dev_tools"
    • After: output_dir = "$root_out_dir/"

    Recompile the source code repository and burn the code into the development board. Then you can find the camera_sample file in the bin directory of the board.

  • The sample code for camera development is stored in applications/sample/camera/media/camera_sample.cpp.

    NOTICE: You should insert a TF card (maximum capacity: 128 GB) for photographing and video recording functions. After the system is started, the TF card is automatically mounted to the /sdcard directory. If the TF card is inserted after the system is started, you have to manually mount the TF card. To view the photos and videos in the TF card, copy the content to a computer. The preview function does not require a TF card.

  1. Run the cd command to go to the end path of the executable program and start camera_sample by running the command in the following figure.

    Figure 1 Starting camera_sample

    The control commands are displayed as shown in the preceding figure. Press S to stop the current operation (including video recording and preview), and press Q to exit the program.

  2. Press 1 to take a photo in JPG format. The photo is saved in the /sdcard directory and named Capture*.

    Figure 2 Serial port logs displayed after the photographing command is executed

    To view the saved file, exit the program and enter the file system. To start the program again, return to the previous step.

    Figure 3 Saved files

  3. Press 2 to start recording. The video file is in MP4 format and saved in the /sdcard directory with the name Record*. Press S to stop recording.

    Figure 4 Serial port logs displayed after the recording command is executed

  4. Press Q to exit.

    Figure 5 Serial port logs displayed after the exit command is executed

1
https://gitee.com/sharlen/docs.git
git@gitee.com:sharlen/docs.git
sharlen
docs
docs
master

搜索帮助