From c50bde13c4a81818613dc0e5ea6c029a4394da65 Mon Sep 17 00:00:00 2001 From: miketsai Date: Sun, 12 Apr 2026 09:41:14 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E5=82=B3=E6=AA=94=E6=A1=88=E5=88=B0?= =?UTF-8?q?=E3=80=8Cini=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/fec_calibrate.ini | 10 ++ ini/fec_conf.ini | 329 ++++++++++++++++++++++++++++++++++++++++++ ini/host_stream.ini | 98 +++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 ini/fec_calibrate.ini create mode 100644 ini/fec_conf.ini create mode 100644 ini/host_stream.ini diff --git a/ini/fec_calibrate.ini b/ini/fec_calibrate.ini new file mode 100644 index 0000000..89d3c79 --- /dev/null +++ b/ini/fec_calibrate.ini @@ -0,0 +1,10 @@ +[lens0] +center_offset_x = 0 +center_offset_y = 0 +radius_offset = 0 +#Single len uses lens0 + +[lens1] +center_offset_x = 0 +center_offset_y = 0 +radius_offset = 0 \ No newline at end of file diff --git a/ini/fec_conf.ini b/ini/fec_conf.ini new file mode 100644 index 0000000..2b10b00 --- /dev/null +++ b/ini/fec_conf.ini @@ -0,0 +1,329 @@ +[fec] +lens_type = 2 +# 0:stereographic, 1:equisolid angle, 2:equidistant, 3:orthographic, 4:LDC, 5:no distort, 6:user defined +user_define_lens_curve_nodes = "./fec_nodes.dat" +# One node "x, y" per line. The max number of nodes is VMF_FEC_CRV_FIT_NODE_MAX_NUM. + +[ori] +zoom = 1.0 +src_radius = 0 +dst_radius = 0 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 + +[mode_6r] +tilt = 42 +zoom = 1.5 +focal = 0.63 +wall_pan_0 = -40 +wall_tilt_0 = 5 +wall_pan_1 = 0 +wall_tilt_1 = 0 +wall_pan_2 = 40 +wall_tilt_2 = 5 +wall_pan_3 = -40 +wall_tilt_3 = -20 +wall_pan_4 = 0 +wall_tilt_4 = -45 +wall_pan_5 = 40 +wall_tilt_5 = -15 + +[mode_4r] +pan_0 = 0.0 +tilt_0 = 0.0 +zoom_0 = 1.5 +pan_1 = 0.0 +tilt_1 = 0.0 +zoom_1 = 1.5 +pan_2 = 0.0 +tilt_2 = 0.0 +zoom_2 = 1.5 +pan_3 = 0.0 +tilt_3 = 0.0 +zoom_3 = 1.5 +focal = 0.63 +wall_pan_0 = 0 +wall_tilt_0 = 33 +wall_pan_1 = 32 +wall_tilt_1 = 0 +wall_pan_2 = -32 +wall_tilt_2 = 0 +wall_pan_3 = 0 +wall_tilt_3 = -33 +eis_enable_0 = 1 +eis_enable_1 = 1 +eis_enable_2 = 1 +eis_enable_3 = 1 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 # point (x,y) +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 +extra_pt_1_en = 0 +extra_pt_1_0 = 0,0 +extra_pt_1_1 = 0,0 +extra_pt_1_2 = 0,0 +extra_pt_1_3 = 0,0 +extra_pt_2_en = 0 +extra_pt_2_0 = 0,0 +extra_pt_2_1 = 0,0 +extra_pt_2_2 = 0,0 +extra_pt_2_3 = 0,0 +extra_pt_3_en = 0 +extra_pt_3_0 = 0,0 +extra_pt_3_1 = 0,0 +extra_pt_3_2 = 0,0 +extra_pt_3_3 = 0,0 + + +[mode_2r] +pan_0 = 0.0 +tilt_0 = 0.0 +zoom_0 = 1.5 +pan_1 = 0.0 +tilt_1 = 0.0 +zoom_1 = 1.5 +focal = 0.63 +wall_pan_0 = 0 +wall_tilt_0 = 33 +wall_pan_1 = 32 +wall_tilt_1 = 0 +eis_enable_0 = 1 +eis_enable_1 = 1 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 +extra_pt_1_en = 0 +extra_pt_1_0 = 0,0 +extra_pt_1_1 = 0,0 +extra_pt_1_2 = 0,0 +extra_pt_1_3 = 0,0 + +[mode_p360] +tilt = 36 +zoom = 1.0 +focal = 0.63 + +[mode_p360fe] +tilt = 0 +zoom = 1 +focal = 0.63 + +[mode_p180a] +tilt = 0.0 +zoom = 1.0 +focal = 0.63 +spin = 0.0 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 + +[mode_p180o] +tilt = 0.0 +zoom = 1.0 +focal = 0.63 +spin = 0.0 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 + +[mode_p180t] +tilt = 0.0 +zoom = 1.5 +focal = 0.63 +curvature = 0.35 +slope = 0.35 +spin = 0.0 + +[mode_p180m] +tilt = 0.0 +zoom = 1.0 +focal = 0.63 + +[mode_p180c] +tilt = 0.0 +zoom = 1.0 +focal = 0.63 + +[mode_p180w] +tilt = 0.0 +zoom = 1.0 +focal = 0.63 +curvature = 0.35 +slope = 0.35 + +[mode_p180] +dst_offset_x = 0 +dst_offset_y = 0 +dst_xy_ratio = 1.0 + +[mode_1r] +tilt = 50 +zoom = 2.0 +focal = 0.63 +wall_pan = 0 +wall_tilt = 33 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 +dst_rotate = 0.0 + +[mode_360video_p360fe] +pan = 0.0 +tilt = 45.0 +zoom = 4.0 +focal = 0.63 +main_customize_layout = 0 +main_top_x = 0 +main_top_y = 0 +main_top_width = 1280 +main_top_height = 512 +main_bottom_x = 0 +main_bottom_y = 512 +main_bottom_width = 1280 +main_bottom_height = 512 +sub_customize_layout = 0 +sub_top_x = 0 +sub_top_y = 0 +sub_top_width = 720 +sub_top_height = 288 +sub_bottom_x = 0 +sub_bottom_y = 288 +sub_bottom_width = 720 +sub_bottom_height = 288 + +[mode_360video_p180v] +tilt = 0.0 +zoom = 0.95 +focal = 0.63 +dst_offset_x = 0 +dst_offset_y = 0 +dst_xy_ratio = 1.0 +main_customize_layout = 0 +main_left_x = 0 +main_left_y = 0 +main_left_width = 640 +main_left_height = 1024 +main_right_x = 640 +main_right_y = 0 +main_right_width = 640 +main_right_height = 1024 +sub_customize_layout = 0 +sub_left_x = 0 +sub_left_y = 0 +sub_left_width = 368 +sub_left_height = 576 +sub_right_x = 368 +sub_right_y = 0 +sub_right_width = 352 +sub_right_height = 576 + + +[dual] +output_type = 0 +# 0: Video 360, 1: Resized original video, 2: up/down P180, 3: up/down 1O, 4: Enlarge Video 360 +blending_width = 64 # Only 32, 64, and 128 are acceptable +sensor_info = 0 # Get sensor compensation + +[dual_lens0] +pan = 0.0 +tilt = 0.0 +zoom = 1.0 +focal_length = 0.6031 +dst_offset_x = 0.0 +dst_offset_y = 0.0 +dst_xy_ratio = 1.0 +dst_radius = 0.0 +fec_mode = 3 # only if output_type=2 // P180a=2 P180o=3 +lens_type = 1 # 0:stereographic, 1:equisolid angle, 2:equidistant, 3:orthographic, 4:LDC, 5:no distort, 6:user defined +homography_matrix = "./fec_matrix0.dat" +user_define_lens_curve_nodes = "./dual_node0.dat" +# One node "x, y" per line. The max number of nodes is VMF_FEC_CRV_FIT_NODE_MAX_NUM. + +[dual_lens1] +pan = 0.0 +tilt = 0.0 +zoom = 1.0 +focal_length = 0.6031 +dst_offset_x = 0.0 +dst_offset_y = 0.0 +dst_xy_ratio = 1.0 +dst_radius = 0.0 +fec_mode = 3 # only if output_type=2 // P180a=2 P180o=3 +lens_type = 1 # 0:stereographic, 1:equisolid angle, 2:equidistant, 3:orthographic, 4:LDC, 5:no distort, 6:user defined +homography_matrix = "./fec_matrix1.dat" +user_define_lens_curve_nodes = "./dual_node1.dat" +# One node "x, y" per line. The max number of nodes is VMF_FEC_CRV_FIT_NODE_MAX_NUM. + +[mode_pt] +dat_path = "./vsrc_ssm_0_2560_1920.dat" +complex_dat_path = "./vsrc_ssm_0_ci_160_120.dat" +mrf_dat_path = "./vsrc_ssm_0_mrf_320_240.dat" + +[mode_1p1r_p180] +type = 3 # 2: all direction, 3: one direction, 4: two direction +zoom = 1.0 +focal = 0.63 +curvature = 0.64 +slope = 0.65 +dst_offset_x = 0 +dst_offset_y = 0 +dst_xy_ratio = 1.0 + +[mode_1p1r_1r] +pan = 0.0 +tilt = 50.0 +zoom = 2.0 +focal = 0.63 +dst_offset_x = 0.0 +dst_offset_y = 0.0 +extra_pt_0_en = 0 +extra_pt_0_0 = 0,0 +extra_pt_0_1 = 0,0 +extra_pt_0_2 = 0,0 +extra_pt_0_3 = 0,0 + +[mode_2p180o] +zoom = 1.0 +focal = 0.63 +dst_offset_x = 0 +dst_offset_y = 0 +dst_xy_ratio = 1.0 + +[EIS] +curve_nodes_path = "./" +gyro_data_gain = 1.0 +grid_section = 40 +max_grid_section = 40 +crop_ratio = 12.5 +image_type = 0 +project_mode = 0 +coord_trans_0 = 4 +coord_trans_1 = 5 +coord_trans_2 = 0 +time_offset = 0 +image_rotate_180 = 0 # 1: Input image rotate 180 degree +readout_time_offset = 0 +readout_time_ratio = 1.0 # This parameter is used for fusion application +force_ori_resize = 0 + +[gyro_daemon] +device_num = 1 +speed = 30 # Getting gyro data from iio (per second), suggest equal to frame rate, default = 30. +frequency = 200 # Frequency for iio to get data. + # (Please check gyro spec for correct number, default: 200) +gyro_fsr = 250 # Gyro full scale range. (-1: do nothing, should be 250, 500, 1000 or 2000) +accel_fsr = -1 # Accel full scall range. (-1: do nothing) +sample_count = 200 # Sample count in gyro buffer. (Suggest equal to frequency, default: 200) +scm_pin_name = "gyro_buffer" # Output SCM pin name. \ No newline at end of file diff --git a/ini/host_stream.ini b/ini/host_stream.ini new file mode 100644 index 0000000..689ead0 --- /dev/null +++ b/ini/host_stream.ini @@ -0,0 +1,98 @@ +[sensor] +sensor_cfg = "./Resource/VIC/0/imx662_1920x1080_ch0.cfg" +fusion_cfg = "./Resource/VIC/1/imx662_1920x1080_ch1.cfg" +autoscene_config = "./Resource/AutoScene/autoscene_conf.cfg" +fec_calibrate_path = "./ini/fec_calibrate.ini" +fec_conf_path = "./ini/fec_conf.ini" +fec_mode = 4 # 0: Original, 1: 1 Region, 2: 180 all direction, 3: 180 one Direction, 4: 180 two direction, 5: PT Mode +initial_fec_app_type = 0 # 0: ceiling, 1: table, 2: wall +eis_enable = 1 + +[nnm] +ModelPath = "nef/STDC04012026_models_630.nef" +ModelId = 32769 # KNERON_YOLOV5S_COCO80_640_640_3 (YOLO v5s) +JobId = 200 # KDP2_INF_ID_APP_YOLO +InferenceStream = 1 # Inference stream index (use stream1: 640x640) +Threshold = 0.5 # for yolo only(JobId = 11) +Fps = 25 # Image input fps for NPU inference +GetImageBufMode = 0 # 0: block mode 1: non-block mode +RoiEnable = 0 # Enable ROI for nnm detect +RoiX = 0 # ROI start x +RoiY = 0 # ROI start y +DrawBoxEnable = 1 # draw object bounding box on stream0 (also enables STDC seg overlay) +OnlyPerson = 1 # only draw person bounding box when DrawBoxEnable + #(so far for yolo only, JobId = 11) +DrawOnResize = 0; # If InferenceStream is 0. This setting needs to be enabled. The box will be drawn on all resize streams. +verbose_log = 0 # 0: quiet (warnings only, ~30B/s), 1: per-frame class ratios every 20 frames (~1KB/s). Toggle from web UI. + +NnmSource = 0 # 0: run host_stream independently, 1: run with streamer +ssm_name = "vsrc_ssm_ifp_0" # If NnmSource is 1. This setting needs to be set. The name is automaticlly create by streamer. + +[voc] +voc_enable = 1 #enable Video Output Component +VocWidth = 1920 #video output width +VocHeight = 1080 #video output height +PixFmt = NV12 # HDMI input format for VOC: NV12 / NV21 / YM12 + +[streamer] +StreamCount = 2 #Stream amount +MemType = 0 #Encode buffer type, 0(SRB mode)/1(SCM mode) + +#stream0 is the main stream which has the same resolution as the sensor. +[stream0] +Codec = 0 #VMF_VENC_CODEC_TYPE_H264 +Width = 1920 #The image width of stream0 +Height = 1080 #The image height of stream0 +FPS = 25 #The frame rate of stream0 +QP = 25 #The base value of the quantization parameter. Its range is from 0 to 51. +Bitrate = 2000000 #The average bitrate of the encoded stream. Its range is from 30,000 to 700,000,000 bps. +PIQ = 0 #PIQ setting. Reduce the difference of QP between intra and inter frame. Default: 0 (disable). +GOP = 50 #Group of pictures. It specifies the number of frames between two intra frames. The maximum GOP value is 600. +Virt_I_Interval = 0 #Virtual intra frame interval. 0:disable, range: 1 ~ (gop-1) +KeepFrameRatio = 0 # This option is valid only on resized stream. +EncodeBufferSize = 6291456 # 6M: 6*1024*1024 = 6291456 +EncodeBufferAmount = 3 # (SRB only) + +[stream1] +Codec = 0 #VMF_VENC_CODEC_TYPE_H264 +Width = 724 #The image width of stream1 (STDC model training resolution) +Height = 362 #The image height of stream1 (STDC model training resolution) +FPS = 25 #The frame rate of stream0 +QP = 25 #The base value of the quantization parameter. Its range is from 0 to 51. +Bitrate = 2000000 #The average bitrate of the encoded stream. Its range is from 30,000 to 700,000,000 bps. +PIQ = 0 #PIQ setting. Reduce the difference of QP between intra and inter frame. Default: 0 (disable). +GOP = 50 #Group of pictures. It specifies the number of frames between two intra frames. The maximum GOP value is 600. +Virt_I_Interval = 0 #Virtual intra frame interval. 0:disable, range: 1 ~ (gop-1) +KeepFrameRatio = 0 # This option is valid only on resized stream. +EncodeBufferSize = 2097152 # 2M: 2*1024*1024 = 2097152 +EncodeBufferAmount = 3 # (SRB only) + +[stream2] +Codec = 0 #VMF_VENC_CODEC_TYPE_H264 +Width = 640 #The image width of stream0 +Height = 480 #The image height of stream0 +FPS = 25 #The frame rate of stream0 +QP = 25 #The base value of the quantization parameter. Its range is from 0 to 51. +Bitrate = 2000000 #The average bitrate of the encoded stream. Its range is from 30,000 to 700,000,000 bps. +PIQ = 0 #PIQ setting. Reduce the difference of QP between intra and inter frame. Default: 0 (disable). +GOP = 50 #Group of pictures. It specifies the number of frames between two intra frames. The maximum GOP value is 600. +Virt_I_Interval = 0 #Virtual intra frame interval. 0:disable, range: 1 ~ (gop-1) +KeepFrameRatio = 0 # This option is valid only on resized stream. +EncodeBufferSize = 2097152 # 2M: 2*1024*1024 = 2097152 +EncodeBufferAmount = 3 # (SRB only) + +[capture] +# Legacy single-JPEG capture (kept for reference, not used by event_recorder) +enable = 0 +http_url = http://192.168.0.114:8081/api/upload +cooldown_ms = 1000 + +[event] +# Violation event recorder — two-channel: JSON (iPad) + tar.gz (Allxon OOB) +enable = 1 +pc_url = http://192.168.0.114:8081 # Channel A: PC mock server (iPad/BLE path) +upload_url = http://192.168.0.114:8081/api/upload # Channel B: tar.gz upload (OOB/cloud path) + # Production: http://192.168.0.99/api/golf.cgi +sd_path = /tmp/sdcard/events # SD card event archive path +sd_max_mb = 7168 # 7 GB — delete oldest when exceeded +upload_delay_ms = 0 # 0: upload immediately after tar.gz built (tar is built after event ends, no extra delay needed)