rgbTogrey

A C++ implementation of GPU accelerated Image Processing using OpenCV for conversion of any color image into its greyscale version.


Project maintained by gitNavV Hosted on GitHub Pages — Theme by mattgraham

rgbTogrey

A C++ implementation of GPU accelerated conversion of any color image into its greyscale version.

Building on OS X

These instructions are for OS X 10.9 “Mavericks”.

Instruction for make :

NVCC = nvcc

These are the default install

locations on most linux distros

OPENCV_LIBPATH = /usr/lib </br> OPENCV_INCLUDEPATH = /usr/include</br>

On Macs the default install locations are below

OPENCV_LIBPATH = /usr/local/lib</br> OPENCV_INCLUDEPATH = /usr/local/include</br>

or if using MacPorts

OPENCV_LIBPATH = /opt/local/lib</br> OPENCV_INCLUDEPATH = /opt/local/include</br>

OPENCV_LIBS = -lopencv_core -lopencv_imgproc -lopencv_highgui</br>

CUDA_INCLUDEPATH = /usr/local/cuda-5.0/include</br>

On Macs the default install locations are below

CUDA_INCLUDEPATH = /usr/local/cuda/include</br> CUDA_LIBPATH = /usr/local/cuda/lib</br>

NVCC_OPTS = -O3 -arch=sm_20 -Xcompiler -Wall -Xcompiler -Wextra -m64</br>

GCC_OPTS = -O3 -Wall -Wextra -m64</br>

student: main.o student_func.o compare.o reference_calc.o Makefile</br> $(NVCC) -o HW1 main.o student_func.o compare.o reference_calc.o -L $(OPENCV_LIBPATH) $(OPENCV_LIBS) $(NVCC_OPTS)</br>

main.o: main.cpp timer.h utils.h reference_calc.cpp compare.cpp HW1.cpp</br> g++ -c main.cpp $(GCC_OPTS) -I $(CUDA_INCLUDEPATH) -I $(OPENCV_INCLUDEPATH)</br>

student_func.o: student_func.cu utils.h</br> nvcc -c student_func.cu $(NVCC_OPTS)</br>

compare.o: compare.cpp compare.h</br> g++ -c compare.cpp -I $(OPENCV_INCLUDEPATH) $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)</br></br>

reference_calc.o: reference_calc.cpp reference_calc.h</br> g++ -c reference_calc.cpp -I $(OPENCV_INCLUDEPATH) $(GCC_OPTS) -I $(CUDA_INCLUDEPATH)</br>

clean:</br> rm -f *.o *.png hw