Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.74 KB

README.md

File metadata and controls

76 lines (54 loc) · 1.74 KB

opencv-benches

A benchmarking suite for comparing performance of various opencv library components using Google Benchmark.

Requirements

  • CMake 3.14+
  • C++14 compiler
  • OpenCV 4.x
  • Just command runner
  • Ninja

Build

Using the just command runner:

just clean    # Make sure that there's no 'build/' dir
just build
just run

Or by doing it manually:

mkdir build && cd build

# Without codspeed
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

# With Codspeed instrumentation
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCODSPEED_MODE=instrumentation ..

# With regular timing based benchmarks
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCODSPEED_MODE=walltime ..

make

Run

cp -r assets/ build/

# Run individual component benchmarks
./build/classifier
./build/color
./build/filter
./build/image
./build/transform

# Run all benchmarks with a single command
cmake --build ./build --target run_all_benchmarks

# Pass arguments to all benchmarks
cmake --build . --target run_all_benchmarks -- --benchmark_filter=BM_Boost

# Run with regex filter
./build/transform --benchmark_filter="BM_Rotate"

# List available benchmarks
./build/transform --benchmark_list_tests

Benchmark Categories

  • Classifier: Detects objects in images.
  • Color: Converts colors between different color spaces.
  • Image: Everything related to image processing
  • Filter: Applies various image filters (e.g. blur, sharpen, edge detection).
  • Transform: Performs image transformations (e.g. rotation, scaling, cropping, ...)

References