@@ -7,38 +7,14 @@ The camera pipeline is a simple five-stage image signal processor (ISP) which pr
See the original camera/vision pipeline repo (repo: `yaoyuannnn/cava`) for details on each stage.
## HPVM DFG
The single-node HPVM DFG for the camera pipeline is as follows:
")
A multi-node DFG with one node per pipeline stage is forthcoming. (This will most likely be similar to the `parboil/benchmarks/pipeline` example in HPVM.)
## Motivation: Pilot Project
This is an out-of-source C program with external C/C++ dependencies (e.g., the `gem5-aladdin` toolkit for SoC simulation). It is a pilot project to demonstrate the integration of HPVM into an existing external codebase with external dependencies for hardware characterization.
## How to Build and Test
1. Clone the HPVM repo (`mariaKt/hpvm`) and build HPVM according to its instructions.
2. Set the source paths in the Makefile appropriately.
The remaining steps are the same as in the convenience shell script `run-camera-pipeline.sh`. (This script calls `eog` by default to view the output.)
3. Build with `make TARGET=seq`
4. Run with `./cava-visc example-face/raw_face_32x32.bin example-face/face.bin`. (This processes the raw image `example-face/raw_face_32x32.bin`. Note that raw images are different from bitmaps, so you might need to obtain them using special software.)
5. Convert the binary output to a PNG with `python scripts/load_and_convert.py -b example-face/face.bin`
6. View the resulting PNG at `example-face/face.png`.
If all went well, `example-face/face.png` should look something like this:

## Contributing
The main file of interest is: `benchmarks/cava/src/visc/cam_pipe.c`. This file defines the HPVM data flow graph (DFG), which must be defined in one file.
## TODO
After building HPVM, the following steps are required to build and run the camera pipeline:
- Clearly describe any present limitations of the camera pipeline for processing certain raw input images.
- Copy details about camera pipeline stages from `yaoyuannnn/cava` README.
1. Build with `make TARGET=seq` for CPU and `make TARGET=gpu` for gpu.
2. Run with `./cava-visc-<Target> example-tulip-small/raw_tulip-small.bin example-tulip-small/tulip-small`.
*`<Target>` can be either `seq` or `gpu` depending on what target is used to build.
* This processes the raw image `example-tulip-small/raw_tulip-small.bin`. Note that raw images are different from bitmaps, so you might need to obtain them using special software.
* This generates: `tulip-small.bin` and `tulip-small-<stage>.bin` where `<stage>` represents the stage of the pipeline.
3. Convert the binary outputs to a PNG with `./convert.sh example-tulip-small`
4. View the resulting PNG at `example-tulip-small/tulip-small.png`. (As well as all the intermediary images for each stage `tulip-small-<stage>.png`)