Skip to content

[Bug]: Example not working: opencv_camera_test.elf #84

@KrystofVydra

Description

@KrystofVydra

What happened

opencv_camera_test.elf produces blank output on the HDMI screen and also blank images taken from camera. The fastboot app, that also takes realtime camera capture and displays it on HDMI works. Only the OpenCV implementation doesn't. In the log, it say that "d" is invalid option.

Reproduction steps

  1. Compile opencv_camera_test.elf following tutorial: https://github.com/kendryte/k230_docs/blob/f99a29267ee3ca0353cf94a42e68d80aa14f0acb/en/01_software/board/middleware/K230_OpenCV_Sensor_Usage.md

  2. copy the compiled opencv_camera_test.elf file to sharefs.

  3. run the opencv_camera_test.elf app on the big core as specified in the tutorial:
    ./opencv_camera_test.elf -D 101 -m 0 -d 0 -s 24 -c 0 -f 0 -W 1920 -H 1080

Hardware board

CanMV K230 v1.1

Software version

k230 SDK v1.8

Bug frequency

always

Anything else

Here I attach both opencv_camera_test.elf and fastboot_app.elf logs:

opencv_camera_test.elf log:

msh /sharefs>./opencv_camera_test.elf -D 101 -m 0 -d 0 -s 24 -c 0 -f 0 -W 1920 -H 1080
opencv camera test, Nov 14 2024-05:28:29 enter
[opencv_camera]# display: 101
[opencv_camera]# work_mode: 0
./opencv_camera_test.elf: unrecognized option: d
Invalid option
kd_mpi_vicap_get_sensor_string, sensor_type(24)
kd_mpi_vicap_get_sensor_string, sensor_string(cam-ov5647-mode0)
[opencv_camera]# device_name: cam-ov5647-mode0
[opencv_camera]# chn: 0
[opencv_camera]# pixel format: 31
[opencv_camera]# ori out width: 1920, align out width: 1920
[opencv_camera]# out_height: 1080
display_width:1920, display_height:1080
[D/lt9611] vtotal 1125 vactive 1080 htotal_sys 400

opencv camera test, out_width(1920)
opencv camera test, out_height(1080)
opencv camera test, out_channel(0)
opencv camera test, out_format(31)
opencv camera test, work_mode(0)
k230_display_layer_init, width(1920), height(1080), margin(0), total_height(1080)
k230_display_layer_init, layer(1), offset.x(0), offset.y(0), relative_height(0)
mirror mirror is 0 , sensor tpye is 24 
ov5647_power_rest OV5647_CAM_PIN is 0 
[tuning] dev: 0
acq_win.width: 1920
acq_win.height: 1080
pipe_ctrl: 0
sensor_fd: 8
sensor_type: 24
sensor_name: ov5647
database_name: ov5647-1920x1080
buffer_num: 0
buffer_size: 0
[tuning] chn: 0
out_win.width: 1920
out_win.height: 1080
bit_width: 0
pix_format: 5
buffer_num: 4
buffer_size: 3110912
yraw_size: 0
uv_size: 0
v_size: 0
block_type: 1
wait_time: 500
chn_enable: 1
VsiCamDeviceCreate hw:0-vt:0 created!
ov5647_power_rest OV5647_CAM_PIN is 0 
kd_mpi_isp_set_output_chn_format, width(1920), height(1080), pix_format(5)
[dw] init, version Nov  6 2024 14:31:08
---------------------------------------
 Input character to select test option
---------------------------------------
 d: save frame
 q: to exit
---------------------------------------
please Input:



fastboot_app.elf log:

msh />/bin/fastboot_app.elf /bin/test.kmodel
mirror mirror is 0 , senpress 'q' tosor tpye is 24 
ov5647_power_rest OV5647_CAM_PIN is 0 
 exit application!!
[tuning] dev: 0
acq_win.width: 1920
acq_win.height: 1080
pipe_ctrl: 4261412857
sensor_fd: 10
sensor_type: 24
sensor_name: ov5647
database_name: ov5647-1920x1080
buffer_num: 0
buffer_size: 0
[tuning] chn: 0
out_win.width: 1920
out_win.height: 1080
bit_width: 0
pix_format: 5
buffer_num: 10
buffer_size: 3110912
yraw_size: 0
uv_size: 0
v_size: 0
block_type: 1
wait_time: 500
chn_enable: 1
VsiCamDeviceCreate hw:0-vt:0 created!
[D/lt9611] vtotal 1125 vactive 1080 htov5647_power_rest OV5647_CAM_PIN is 0 
o_PIN is 0 

kd_mpi_isp_set_output_chn_format, width(1920), height(1080), pix_format(5)
kd_mpi_isp_set_output_chn_format, width(1280), height(720), pix_format(16)
[dw] init, version Nov  6 2024 14:31:08

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions