Skip to content

Edge detection with Sobel using OpenMP & CUDA based on OpenCV.

License

Notifications You must be signed in to change notification settings

EmbeddedCamerata/Sobel_with_OpenMP_and_CUDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge Detection with Sobel & OpenMP

👉 See branch cuda for CUDA version.

📦 简介

基于OpenCV,使用Sobel算子实现边缘检测,并通过OpenMP实现加速计算

运行平台:gcc 12.1.0 on GNU/Linux

🛠️ 运行

  1. 确保配置了OpenCV、OpenMP(如果是GCC则无需配置)。
  2. 初次运行时,可建立 build 文件夹,并执行如下命令。测试图片及边缘检测结果图均位于 ./pics 下。
mkdir build
cd build
cmake ..
make -j16
cd ..
./build/sobel ./pics/test.png
  1. 通过修改 CMakeLists.txtset(USE_OMP ON)ON/OFF ,并重新编译,即可启用/不启用OpenMP进行加速计算。实际测试加速效果不明显
  2. 运行用时可能与目前CPU运行状态有关。

📚 参考

ElrikPiro/sobel

About

Edge detection with Sobel using OpenMP & CUDA based on OpenCV.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published