I've found that the Help message is incorrect in its discription of how to lay out the command line arguments. You need to specify threads, blocks, and CPU cores.
my-laptop:CudaOtsu:% ./build/CudaOtsu ~/Pictures/sample_images/good/board.png 1024 2 12 --gpu
Setting OpenMP threads num to 12 threads
[CPU-OpenMP] Threshold value: 168
CPU-OpenMP binarization taken 4.204969 seconds
[GPU] Histogram calculated in 12.165824 milliseconds
[GPU] Histogram pixels: 14505216
[GPU] Threshold calculated in 0.043008 milliseconds
[GPU] Threshold value: 168
[GPU] Binarized in 16.961857 milliseconds
[GPU] Total calculation time: 29.170689 milliseconds
If I don't include that 12, then it will run the CPU implementation.
I've found that the Help message is incorrect in its discription of how to lay out the command line arguments. You need to specify threads, blocks, and CPU cores.
If I don't include that
12
, then it will run the CPU implementation.