Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AI-FanGe/OpenAIglasses_for_Navigation
/ functions
Functions
403 in github.com/AI-FanGe/OpenAIglasses_for_Navigation
⨍
Functions
403
◇
Types & classes
31
↳
Endpoints
3
Method
_draw_tl_status
(self, img: np.ndarray, color: str, meta: Dict[str, Any])
navigation_master.py:397
Method
_ensure_binary_mask
阈值化并调整尺寸到图像大小,返回二值 0/1 uint8
workflow_crossstreet.py:347
Method
_estimate_affine
使用光流估计仿射变换(备用方法)
workflow_blindpath.py:1146
Method
_get_crosswalk_guidance_features
计算斑马线引导特征(鲁棒中心线 + 目标点 + 角度/偏移)
workflow_crossstreet.py:672
Function
_get_recorder
延迟导入录制器
audio_player.py:18
Method
_hot_reset
()
asr_core.py:164
Function
_init
()
app_main.py:1278
Method
_morph_smooth
(mask, kernel_size)
workflow_blindpath.py:919
Method
_plan_avoidance
规划避障路径
workflow_blindpath.py:2095
Function
_run
()
app_main.py:375
Method
_run
()
yolomedia.py:225
Method
_run_final
()
asr_core.py:192
Function
_sender
(jpeg_bytes: bytes)
app_main.py:1236
Method
_stabilize_mask
稳定化掩码 - 使用 Lucas-Kanade 光流
workflow_blindpath.py:872
Function
_to_cn_obstacle
将英文障碍物名称转换为中文 :param name: 英文名称 :return: 中文名称
utils.py:47
Method
_to_cn_obstacle
转换障碍物名称为中文
workflow_blindpath.py:2534
Method
_update_crosswalk_tracker
更新斑马线追踪器
workflow_blindpath.py:1225
Method
_warp_mask
应用仿射变换
workflow_blindpath.py:1183
Method
begin
compile/ICM42688.cpp:11
Function
compute_risk_scores
计算障碍物的风险评分 :param obstacles: 当前障碍物列表 :param prev_obstacles: 前一帧障碍物列表 :param M: 仿射变换矩阵 :param path_mask: 路径掩码 :param image_sha
utils.py:245
Method
connection_made
(self, transport)
app_main.py:1215
Method
constructor
(canvasId)
static/vision_renderer.js:4
Method
constructor
(canvasId)
static/vision.js:3
Method
constructor
(canvasId)
static/visualizer.js:3
Method
datagram_received
(self, data, addr)
app_main.py:1217
Method
downsample_pcm16
降采样(可选) 16kHz -> 8kHz 可以再减少50%数据量
audio_compressor.py:283
Function
draw_measure_arrow
(img, p1, p2, txt=None)
yolomedia.py:435
Function
draw_progress_bars
第一条=对齐,第二条=距离(≈1),对应 ratio 与 1 的接近程度
yolomedia.py:316
Function
draw_text_cn
统一的中文文本绘制
trafficlight_detection.py:134
Function
estimate_global_affine
估计两帧之间的全局仿射变换 :param prev_gray: 前一帧灰度图 :param curr_gray: 当前帧灰度图 :param mask: 可选的掩码,只在掩码区域内计算 :return: (仿射矩阵, 内点数)
utils.py:59
Function
extract_english_label
提取中文物品名称对应的英文标签 :param item_cn: 中文物品名称 :return: (英文标签, 来源)
utils.py:34
Function
find_best_mask
(frame_bgr, yolo, W, H, target_cls_id, conf_thr=0.10, roi_rect=None)
yolomedia.py:401
Function
full_system_reset
回到刚启动后的状态: 1) 停播 + 取消AI任务 + 切断所有/stream.wav(hard_reset_audio) 2) 停止 ASR 实时识别流(关键) 3) 清 UI 状态 4) 清最近相机帧(避免把旧帧又拼进下一轮) 5) 告知 ESP
app_main.py:322
Method
getAccelX_mss
compile/ICM42688.cpp:56
Method
getAccelY_mss
compile/ICM42688.cpp:57
Method
getAccelZ_mss
compile/ICM42688.cpp:58
Method
getGyroX_dps
compile/ICM42688.cpp:64
Method
getGyroX_rads
compile/ICM42688.cpp:60
Method
getGyroY_dps
compile/ICM42688.cpp:65
Method
getGyroY_rads
compile/ICM42688.cpp:61
Method
getGyroZ_dps
compile/ICM42688.cpp:66
Method
getGyroZ_rads
compile/ICM42688.cpp:62
Method
getTemperature_C
compile/ICM42688.cpp:68
Function
get_camera_ws
()
app_main.py:1311
Method
get_current_area
获取当前面积
crosswalk_awareness.py:289
Function
get_last_frames
()
app_main.py:1308
Function
gpu_infer_slot
统一管理:GPU 并发限流 + torch.inference_mode() + AMP autocast
models.py:43
Function
health
()
app_main.py:706
Function
init_all_models
在Celery Worker进程启动时被调用一次。 负责加载所有工作流所需的模型到全局变量中。
models.py:86
Function
is_detection_running
检查红绿灯检测是否正在运行
trafficlight_detection.py:473
Method
is_in_arrival_state
是否在到达状态(用于外部判断是否暂停盲道语音)
crosswalk_awareness.py:285
Method
is_in_navigation_mode
检查是否在导航模式(非对话模式)
navigation_master.py:319
Function
is_playing_now
()
audio_stream.py:32
Function
is_stationary_frame
判断用户是否静止 :param prev_gray: 前一帧灰度图 :param curr_gray: 当前帧灰度图 :param mask: 可选的掩码 :param threshold: 静止判定阈值 :return: True表示静止,Fals
utils.py:168
Method
on_close
(self)
asr_core.py:124
Method
on_complete
(self)
asr_core.py:125
Method
on_error
(self, err)
asr_core.py:127
Method
on_event
(self, event)
asr_core.py:135
Method
on_open
(self)
asr_core.py:123
Function
on_result
(result: mp.tasks.vision.HandLandmarkerResult, output_image: mp.Image, timestamp_ms: int)
yolomedia.py:174
Method
on_result
(self, result)
asr_core.py:134
Function
on_shutdown
应用关闭时的清理工作
app_main.py:1292
Function
on_startup
()
app_main.py:1287
Function
on_startup_init_audio
启动时初始化音频系统
app_main.py:1275
Function
on_startup_register_bridge_sender
()
app_main.py:1232
Method
process_frame
处理单帧图像(每帧分割;若失败,用光流追踪上一帧掩码保持可视化与导航)
workflow_crossstreet.py:1202
Method
process_frame
处理每帧的斑马线检测 返回: { 'voice_text': 语音文本, 'priority': 优先级, 'should_broadcast': 是否应该播报
crosswalk_awareness.py:56
Method
process_frame
处理单帧图像 :param image: BGR格式的图像 :return: 处理结果
workflow_blindpath.py:401
Function
process_single_frame
处理单帧图像(主线程模式,避免掉帧) 参数: image: 输入图像 ui_broadcast_callback: 前端广播回调函数(用于显示红绿灯状态) 返回:{'vis_image': 可视化图像, 'detected_light': 检
trafficlight_detection.py:496
Function
push
(v)
static/main.js:712
Function
push_raw_jpeg
由 app_main.py 在收到 /ws/camera 帧时调用
bridge_io.py:34
Method
readRegister
compile/ICM42688.cpp:77
Method
readRegisters
compile/ICM42688.cpp:86
Method
readSensor
compile/ICM42688.cpp:41
Function
record_audio
记录音频(供外部调用)
sync_recorder.py:317
Function
record_frame
记录一帧(供外部调用)
sync_recorder.py:311
Method
render
()
static/vision_renderer.js:82
Method
reset
完全重置
crosswalk_awareness.py:275
Function
reset_detection_state
重置检测状态
trafficlight_detection.py:611
Method
resizeCanvas
()
static/vision_renderer.js:38
Method
resizeCanvas
()
static/visualizer.js:38
Function
root
()
app_main.py:701
Method
say_async
(self, text: str)
yolomedia.py:222
Function
send_ui_final
把一条UI文案作为 final answer 推给前端(线程安全回调)
bridge_io.py:82
Function
send_vis_bgr
被 YOLO/MediaPipe 脚本调用:把处理后画面推给前端 viewer
bridge_io.py:65
Function
set_sender
由 app_main.py 调用,注册一个函数:cb(jpeg_bytes)->None
bridge_io.py:22
Function
set_ui_sender
由 app_main.py 调用,注册一个函数:cb(text:str)->None
bridge_io.py:28
Function
signal_handler
处理Ctrl+C信号
app_main.py:246
Function
start_detection
启动红绿灯检测(在后台线程中运行)
trafficlight_detection.py:432
Function
start_recording
启动录制
sync_recorder.py:301
Function
stop_detection
停止红绿灯检测
trafficlight_detection.py:452
Function
stop_recording
停止录制
sync_recorder.py:306
Function
stream_wav
(_: Request)
audio_stream.py:122
Function
syncHeights
()
static/main.js:401
Method
tensor_to_numpy_mask
安全地将各种类型的张量转换为 numpy 掩码
obstacle_detector_client.py:76
Method
updateVisualization
(data)
static/vision.js:126
Function
wait_raw_bgr
被 YOLO/MediaPipe 脚本调用:等待并拿到最新一帧BGR;超时返回 None
bridge_io.py:42
Method
writeRegister
compile/ICM42688.cpp:70
Function
ws_audio
(ws: WebSocket)
app_main.py:729
Function
ws_camera_esp
(ws: WebSocket)
app_main.py:864
← previous
next →
301–400 of 403, ranked by callers