IPB

Welcome Guest ( Log In | Register )

> CUDA and OpenCV, how to put them working together?
molecula21
post Feb 23 2009, 05:23 PM
Post #1



*

Group: Members
Posts: 2
Joined: 23-February 09
Member No.: 142,337
Org.: FCTUC



hi everybody,

i'm trying to do a simple thing, runing some OpenCV code on my CUDA (using cublas) project.

i'm just trying to compile the folowing lines (they are in the midle of CUBLAS code):

CODE
IplImage* img;
img=cvLoadImage( "./org.jpg",CV_LOAD_IMAGE_COLOR );
cvNamedWindow("Capture",CV_WINDOW_AUTOSIZE);
cvShowImage("Capture",img);


i have all the necessary includes in the file and my makefile looks like:

CODE
# Add source files here
EXECUTABLE    := gpgpu
# Cuda source files (compiled with cudacc)
CUFILES        := #gpgpu.cu
# C/C++ source files (compiled with gcc / c++)
CCFILES        := \
    main.cpp \
    auxfunctions.cpp \
    #gpgpu_gold.cpp \
# Additional libraries needed by the project
USECUBLAS       := 1

############################################################
####################
# Rules and targets

# for OpenCV's includes and libs, create path
NVCCFLAGS+=`pkg-config opencv --cflags`
    LIB+=`pkg-config opencv --libs`

include ../../common/common.mk


when i try to compile it gives the following error:

CODE
obj/release/main.cpp.o: In function `main':
main.cpp:(.text+0xa9): undefined reference to `cvLoadImage'
main.cpp:(.text+0xbf): undefined reference to `cvNamedWindow'
main.cpp:(.text+0xcf): undefined reference to `cvShowImage'
collect2: ld returned 1 exit status
make: *** [../../bin/linux/release/gpgpu] Error 1


i supose this is because the Opencv library's are not linked correctly. i'v looked everywhere and i was's able to find any decent topic about putting opencv and CUDA/CUBLAS working together.
I'd really apreciate any help. I'm running Ubuntu 8.04 on a 8800 GT.

thanks
Go to the top of the page
 
+Quote Post

Posts in this topic
- molecula21   CUDA and OpenCV   Feb 23 2009, 05:23 PM
- - molecula21   Found a solution. it's certainly not the way t...   Feb 23 2009, 07:04 PM


Reply to this topicStart new topic

 



Copyright 2008 NVIDIA Corporation.  Terms of Use | Legal Info | Privacy Policy Time is now: 10th February 2010 - 12:12 AM
Unites States Argentina Brazil Chile China Colombia France Germany India Italy Japan Korea Mexico Poland Russia Spain Taiwan United Kingdom Venezuela