Commit 92500c2
feat(enhanced-vision): implement HOGCells and HOGFeatures kernels (#36)
* feat(enhanced-vision): implement HOGCells + HOGFeatures kernels
- vxu_hog_cells_impl: Sobel gradients → orientation histogram per cell (magnitudes + bins tensors, INT16 Q78)
- vxu_hog_features_impl: Block grouping → concatenation → L2-Hys normalization → features tensor
- Replace ev_node_stub! / ev_vxu_stub! with real node constructors + immediate wrappers
- Register kernels (0x39 hog_cells, 0x3A hog_features) in c_api.rs
- Add dispatch cases and output param tracking in unified_c_api.rs
- Add HOGCells + HOGFeatures to enhanced-vision CI filter
- Builds clean, no regressions
* fix(hog-kernels): implement HOG immediate mode and node creation
- vxuHOGCells: call vxu_hog_cells_impl instead of returning NOT_IMPLEMENTED
- vxHOGFeaturesNode: create real node with params instead of NULL stub
- vxuHOGFeatures: call vxu_hog_features_impl instead of returning NOT_IMPLEMENTED
- vxHOGCellsNode: add comment clarifying scalar release is safe (ref counting)
- vxBilateralFilterNode: same scalar release clarification comment
- vxu_bilateral_filter_impl: fix Q7.8 (S16) handling:
- Convert sigma_values from Q7.8 to float (divide by 256)
- Build 65536-entry color weight LUT indexed by raw Q7.8 difference
- Clamp output to i16 range after rounding
- HOG executor: fix params.len() check from >= 7 to >= 6 (node passes 6 params)
All HOGCells, HOGFeatures, and BilateralFilter tests now have working
graph and immediate mode paths.
* fix(hog-kernels): resolve HOGFeatures graph-mode use-after-free and Q7.8 precision
- Remove temporary params_size_scalar from vxHOGFeaturesNode to eliminate
use-after-free during graph execution (scalar freed before graph runs)
- Pass null for param[4] and default to sizeof(vx_hog_t) in dispatch
- Fix Q7.8 intermediate precision: store Q7.8 values with truncation after
each normalization step instead of keeping float until final round()
- Fix HOGCells to accumulate with truncation per pixel (match CTS reference)
- Update execute_node to allow null param for hog_features param[4]
All 22 HOG tests now pass (HOGCells 11/11, HOGFeatures 11/11)
---------
Co-authored-by: Kiriti <kiriti@example.com>
Co-authored-by: Simon (OpenClaw) <simon@openclaw.local>1 parent 4258032 commit 92500c2
5 files changed
Lines changed: 1367 additions & 30 deletions
File tree
- .github/workflows
- openvx-core/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
571 | 569 | | |
572 | | - | |
| 570 | + | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
| |||
586 | 584 | | |
587 | 585 | | |
588 | 586 | | |
589 | | - | |
| 587 | + | |
590 | 588 | | |
591 | 589 | | |
592 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| |||
0 commit comments