{"id":15043513,"url":"https://github.com/sunsided/rust-openvx","last_synced_at":"2025-04-14T20:57:27.300Z","repository":{"id":141992978,"uuid":"295562403","full_name":"sunsided/rust-openvx","owner":"sunsided","description":"OpenVX in Rust - an experiment","archived":false,"fork":false,"pushed_at":"2024-05-11T17:06:51.000Z","size":512,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T09:11:22.213Z","etag":null,"topics":["bindgen","computer-vision","edge-computing","openvx","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/openvx","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunsided.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-14T23:29:55.000Z","updated_at":"2024-05-11T17:05:10.000Z","dependencies_parsed_at":"2025-03-07T12:00:35.664Z","dependency_job_id":null,"html_url":"https://github.com/sunsided/rust-openvx","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frust-openvx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frust-openvx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frust-openvx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Frust-openvx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunsided","download_url":"https://codeload.github.com/sunsided/rust-openvx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961186,"owners_count":21189991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindgen","computer-vision","edge-computing","openvx","rust"],"created_at":"2024-09-24T20:49:12.232Z","updated_at":"2025-04-14T20:57:27.277Z","avatar_url":"https://github.com/sunsided.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenVX 1.3 meets Rust\n\n![](https://img.shields.io/badge/OpenVX-1.3.1-blue)\n![](https://img.shields.io/badge/OpenCV-4.6-blue?logo=opencv)\n[![codecov](https://codecov.io/gh/sunsided/rust-openvx/graph/badge.svg?token=DURM37BW0T)](https://codecov.io/gh/sunsided/rust-openvx)\n\nThis repo consists of the following parts:\n\n- [openvx-sys](openvx-sys) is the bindgen-generated Rust wrapper around OpenVX,\n- [openvx](openvx) contains a Rust-y wrapper around the sys crate.\n\nTest applications:\n\n- [canny-edge-detector](canny-edge-detector/src/main.rs) contains a port of the Canny Edge Detector sample\n  of the [OpenVX Samples](https://github.com/KhronosGroup/openvx-samples).\n\nHere's an example input and output of the Canny Edge Detection sample.\n\n![](.readme/canny.png)\n\n```text\nVX_TYPE_GRAPH: CANNY_GRAPH, 3 nodes, VX_GRAPH_STATE_COMPLETED, avg perf 0.044175636, 0 parameters, 1 refs\nVX_TYPE_NODE: RGB_TO_YUV, 2 params, avg perf 0.002818527, VX_SUCCESS, 1 refs\nVX_TYPE_NODE: EXTRACT_LUMA, 3 params, avg perf 0.002013746, VX_SUCCESS, 1 refs\nVX_TYPE_NODE: CANNY_EDGE, 5 params, avg perf 0.039333154, VX_SUCCESS, 1 refs\n```\n\nNote that for some reason the graph release operation\n\n```rust\nvxReleaseGraph(\u0026mut graph);\n```\n\ncurrently produces the following log messages with the associated status `VX_ERROR_INVALID_REFERENCE`:\n\n```text\nFailed to remove kernel[0]=org.khronos.extra.edge_trace\nFailed to remove kernel[1]=org.khronos.extra.euclidean_nonmaxsuppression_harris\nFailed to remove kernel[2]=org.khronos.extras.harris_score\nFailed to remove kernel[3]=org.khronos.extras.laplacian3x3\nFailed to remove kernel[4]=org.khronos.extras.image_to_list\nFailed to remove kernel[5]=org.khronos.extra.nonmaximasuppression\nFailed to remove kernel[6]=org.khronos.extra.elementwise_norm\nFailed to remove kernel[7]=org.khronos.extras.scharr3x3\nFailed to remove kernel[8]=org.khronos.extras.sobelMxN\n```\n\nThe OpenVX 1.3 Quick Reference Guide was added [here](reference/openvx-13-reference-card.pdf)\nfor convenience.\n\n## WIP\n\nTo install Intel OpenCL on Ubuntu 20.04, run\n\n```bash\nsudo apt-get install ocl-icd-opencl-dev intel-opencl-icd\n```\n\nTest using `clinfo`.\n\nInstall the [Khronos OpenVX Sample Implementation](https://github.com/KhronosGroup/OpenVX-sample-impl)\n\n```bash\ngit clone --recursive https://github.com/KhronosGroup/OpenVX-sample-impl\n```\n\nI built from commit [`9caba36`](https://github.com/KhronosGroup/OpenVX-sample-impl/tree/9caba36a541fa6480f9d65d9a78dde208ebe96f9) by using\n\n```bash\npython Build.py \\\n    --os=Linux --arch=64 --conf=Release \\\n    --c=clang --cpp=clang \\\n    --conf_vision --conf_nn \\\n    --opencl_interop --enh_vision --ix \\\n    --streaming --pipelining\n```\n\nThe commit was added as a git submodule at [vendor/openvx-sample-impl](vendor/openvx-sample-impl) for convenience.\n\nBuilding using `--conf_nnef` (the Neural Network Exchange Format) didn't work for some\nreason, and specifying `--opencl` always targeted NEON architecture, so didn't work.\n\nTo build the Rust projects, make sure the OpenVX library and headers are in scope:\n\n```bash\nexport OPENVX_DIR=/path/to/OpenVX-sample-impl/install/Linux/x64/Release\nexport LIBRARY_PATH=$LIBRARY_PATH:$OPENVX_DIR/bin\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENVX_DIR/bin\n```\n\n## Further reading\n\n- [OpenVX 1.3 Sample Implementation: Sample Build Instructions](https://github.com/KhronosGroup/OpenVX-sample-impl#sample-build-instructions)\n- [Installing Intel® oneAPI Toolkits via Linux* Package Managers](https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html)\n- [Install Intel® Distribution of OpenVINO™ toolkit for Linux* Using APT Repository](https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html)\n- [Intel® Distribution of OpenVX* Implementation Developer Guide](https://software.intel.com/content/www/us/en/develop/documentation/openvino-ovx-guide/top.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Frust-openvx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunsided%2Frust-openvx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Frust-openvx/lists"}