{"id":26167397,"url":"https://github.com/alessiobugetti/integral-image-processing","last_synced_at":"2026-05-24T01:32:42.209Z","repository":{"id":281203883,"uuid":"936329250","full_name":"AlessioBugetti/integral-image-processing","owner":"AlessioBugetti","description":"Implements sequential and parallel integral image computation in C++ and Python, utilizing CUDA for parallel computation on GPU","archived":false,"fork":false,"pushed_at":"2025-03-07T14:44:56.000Z","size":723,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T15:34:01.090Z","etag":null,"topics":["cuda","gpu-acceleration","integral-image","numba","parallel-computing","pycuda"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlessioBugetti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-20T22:46:40.000Z","updated_at":"2025-03-07T14:44:59.000Z","dependencies_parsed_at":"2025-03-07T15:44:10.956Z","dependency_job_id":null,"html_url":"https://github.com/AlessioBugetti/integral-image-processing","commit_stats":null,"previous_names":["alessiobugetti/integral-image-processing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlessioBugetti%2Fintegral-image-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlessioBugetti%2Fintegral-image-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlessioBugetti%2Fintegral-image-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlessioBugetti%2Fintegral-image-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlessioBugetti","download_url":"https://codeload.github.com/AlessioBugetti/integral-image-processing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243079679,"owners_count":20233035,"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":["cuda","gpu-acceleration","integral-image","numba","parallel-computing","pycuda"],"created_at":"2025-03-11T17:35:39.642Z","updated_at":"2025-12-25T01:39:22.881Z","avatar_url":"https://github.com/AlessioBugetti.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUDA-Based Integral Image Computation\n\n## Table of Contents\n- [Overview](#overview)\n  - [Integral Image](#integral-image)\n    - [Formula](#formula)\n- [Repository Structure](#repository-structure)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [C++](#c)\n    - [Python](#python)\n- [Cuda Kernels](#cuda-kernels)\n    - [Included Kernels](#included-kernels)\n- [Performance](#performance)\n- [License](#license)\n- [Author](#author)\n\n## Overview\nThis project implements integral image computation for grayscale images using CUDA. It leverages GPU parallel processing to achieve high performance.\n\nThe parallel computation on the GPU is based on the alternation of two kernels in the following order:\n1. Row-wise Scan\n2. Transpose\n3. Row-wise Scan\n4. Transpose\n\nSpecifically, for the scan kernel, two versions are provided: a naive implementation and an optimized one.\n\n### Integral Image\nAn integral image, also known as a summed-area table, is a representation that allows for fast computation of the sum of values in a rectangular subset of an image.\n\nFor example:\n\n![Integral Image Example](https://i.ibb.co/4wT6rKMg/240px-Integral-image-application-example-svg.png)\n\n#### Formula\nGiven an input image $i(x, y)$, the integral image $I(x, y)$ is computed as:\n\n$$\nI(x,y) = i(x,y) + I(x-1,y)+I(x,y-1)-I(x-1,y-1)\n$$\n\n## Repository Structure\n\n```plaintext\n.\n├── python/\n│   ├── pycuda_test.py   # Python script using pyCUDA for invoking CUDA kernels and managing the workflow\n│   └── numba_test.py    # Python script using Numba for invoking CUDA kernels and managing the workflow\n├── c++/\n│   ├── main.cu          # CUDA source file containing benchmarking logic\n│   └── kernel.cu        # CUDA kernel definitions\n└── integralimage        # Script for compiling the project and running benchmarks\n```\n\n## Prerequisites\n\n- CUDA-capable NVIDIA GPU\n- CUDA Toolkit\n- C++ compiler\n- CMake\n- Python 3.x (for Python interface)\n- Python Libraries:\n    - numpy\n    - pycuda\n    - numba\n\n## Installation\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/AlessioBugetti/integral-image-processing.git\ncd integral-image-processing\n```\n2. Install Python dependencies:\n\n```sh\npip install -r python/requirements.txt\n```\n3. Ensure the CUDA environment is set up:\n    - Install NVIDIA drivers.\n    - Install the CUDA Toolkit.\n    - Verify with ```nvcc --version```.\n\n## Usage\n\n### C++\n```sh\n./integralimage build\n./integralimage run\n```\n\n### Python\n```sh\npython pycuda_test.py\n```\nor\n```sh\npython numba_test.py\n```\n\n## Cuda Kernels\n\n### Included Kernels:\n- `SumRows`: Naively computes the row-wise scan (prefix sum) of a matrix\n- `SinglePassRowWiseScan`: Optimized computation of the row-wise scan (prefix sum) of a matrix\n- `Transpose`: Transposes a matrix using block-level tiling with shared memory\n\n## Performance\nThe implementation includes benchmarking capabilities that measure:\n- Sequential CPU execution time\n- CUDA execution time for the naive implementation of the integral image computation\n- CUDA execution time for the optimized implementation of the integral image computation\n- Speedup ratios compared to the CPU implementation for both the naive and optimized implementations\n- Measurements are averaged over multiple iterations to ensure reliable results.\n\n## License\nThis project is licensed under the GPL-3.0-only License. See the [`LICENSE`](LICENSE) file for more details.\n\n## Author\nAlessio Bugetti - alessiobugetti98@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessiobugetti%2Fintegral-image-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falessiobugetti%2Fintegral-image-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falessiobugetti%2Fintegral-image-processing/lists"}