Quantcast

opencv and caspa

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

opencv and caspa

Kobja
This post has NOT been accepted by the mailing list yet.
Still trying to use caspa... I decided to use the opencv libraries directly.

The code (in C)
 
#include </usr/include/opencv/cv.h>
#include </usr/include/opencv/highgui.h>
#include <stdio.h>

 // A Simple Camera Capture Framework
 int main() {
   CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );
   if ( !capture ) {
     fprintf( stderr, "ERROR: capture is NULL \n" );
     getchar();
     return -1;
   }

printf("starting:\n");
     // Get one frame
IplImage* frame = cvQueryFrame( capture );
     if ( !frame ) {
       fprintf( stderr, "ERROR: frame is null...\n" );
     }
      else cvSaveImage("./camera.jpg",  frame,0);
        //printf("another frame\n");
   // Release the capture device housekeeping
   cvReleaseCapture( &capture );
   return 0;
 }

the answer


root@omap3-multi:~# gcc cam.c
/tmp/ccZYfTQT.o: In function `cvRound':
cam.c:(.text+0x1c): undefined reference to `lrint'
/tmp/ccZYfTQT.o: In function `cvDecRefData':
cam.c:(.text+0xe30): undefined reference to `cvFree_'
cam.c:(.text+0xed8): undefined reference to `cvFree_'
/tmp/ccZYfTQT.o: In function `cvGetRow':
cam.c:(.text+0x1074): undefined reference to `cvGetRows'
/tmp/ccZYfTQT.o: In function `cvGetCol':
cam.c:(.text+0x10b8): undefined reference to `cvGetCols'
/tmp/ccZYfTQT.o: In function `cvReleaseMatND':
cam.c:(.text+0x10e8): undefined reference to `cvReleaseMat'
/tmp/ccZYfTQT.o: In function `cvSubS':
cam.c:(.text+0x127c): undefined reference to `cvAddS'
/tmp/ccZYfTQT.o: In function `cvCloneSeq':
cam.c:(.text+0x12d0): undefined reference to `cvSeqSlice'
/tmp/ccZYfTQT.o: In function `cvSetNew':
cam.c:(.text+0x135c): undefined reference to `cvSetAdd'
/tmp/ccZYfTQT.o: In function `cvGetSetElem':
cam.c:(.text+0x1438): undefined reference to `cvGetSeqElem'
/tmp/ccZYfTQT.o: In function `cvEllipseBox':
cam.c:(.text+0x1560): undefined reference to `cvEllipse'
/tmp/ccZYfTQT.o: In function `cvFont':
cam.c:(.text+0x15e8): undefined reference to `cvInitFont'
/tmp/ccZYfTQT.o: In function `cvReadIntByName':
cam.c:(.text+0x16d8): undefined reference to `cvGetFileNodeByName'
/tmp/ccZYfTQT.o: In function `cvReadRealByName':
cam.c:(.text+0x17cc): undefined reference to `cvGetFileNodeByName'
/tmp/ccZYfTQT.o: In function `cvReadStringByName':
cam.c:(.text+0x1880): undefined reference to `cvGetFileNodeByName'
/tmp/ccZYfTQT.o: In function `cvReadByName':
cam.c:(.text+0x18d0): undefined reference to `cvGetFileNodeByName'
cam.c:(.text+0x18e4): undefined reference to `cvRead'
/tmp/ccZYfTQT.o: In function `cvCreateSubdivDelaunay2D':
cam.c:(.text+0x1928): undefined reference to `cvCreateSubdiv2D'
cam.c:(.text+0x1944): undefined reference to `cvInitSubdivDelaunay2D'
/tmp/ccZYfTQT.o: In function `cvContourPerimeter':
cam.c:(.text+0x1bf4): undefined reference to `cvArcLength'
/tmp/ccZYfTQT.o: In function `cvCalcHist':
cam.c:(.text+0x1c44): undefined reference to `cvCalcArrHist'
/tmp/ccZYfTQT.o: In function `main':
cam.c:(.text+0x1df4): undefined reference to `cvCreateCameraCapture'
cam.c:(.text+0x1e44): undefined reference to `cvQueryFrame'
cam.c:(.text+0x1e84): undefined reference to `cvSaveImage'
cam.c:(.text+0x1e90): undefined reference to `cvReleaseCapture'
collect2: ld returned 1 exit status
I bit information about the libraries:

root@omap3-multi:~# find / | grep opencv
/usr/include/opencv2
/usr/include/opencv2/highgui
/usr/include/opencv2/highgui/highgui.hpp
/usr/include/opencv2/highgui/highgui_c.h
/usr/include/opencv2/legacy
/usr/include/opencv2/legacy/compat.hpp
/usr/include/opencv2/legacy/legacy.hpp
/usr/include/opencv2/legacy/blobtrack.hpp
/usr/include/opencv2/legacy/streams.hpp
/usr/include/opencv2/gpu
/usr/include/opencv2/gpu/stream_accessor.hpp
/usr/include/opencv2/gpu/gpu.hpp
/usr/include/opencv2/gpu/devmem2d.hpp
/usr/include/opencv2/gpu/matrix_operations.hpp
/usr/include/opencv2/flann
/usr/include/opencv2/flann/flann_base.hpp
/usr/include/opencv2/flann/index_testing.h
/usr/include/opencv2/flann/kdtree_index.h
/usr/include/opencv2/flann/random.h
/usr/include/opencv2/flann/heap.h
/usr/include/opencv2/flann/composite_index.h
/usr/include/opencv2/flann/general.h
/usr/include/opencv2/flann/flann.hpp
/usr/include/opencv2/flann/saving.h
/usr/include/opencv2/flann/kmeans_index.h
/usr/include/opencv2/flann/simplex_downhill.h
/usr/include/opencv2/flann/ground_truth.h
/usr/include/opencv2/flann/logger.h
/usr/include/opencv2/flann/nn_index.h
/usr/include/opencv2/flann/result_set.h
/usr/include/opencv2/flann/object_factory.h
/usr/include/opencv2/flann/matrix.h
/usr/include/opencv2/flann/dist.h
/usr/include/opencv2/flann/linear_index.h
/usr/include/opencv2/flann/timer.h
/usr/include/opencv2/flann/all_indices.h
/usr/include/opencv2/flann/allocator.h
/usr/include/opencv2/flann/sampling.h
/usr/include/opencv2/flann/autotuned_index.h
/usr/include/opencv2/flann/hdf5.h
/usr/include/opencv2/opencv.hpp
/usr/include/opencv2/core
/usr/include/opencv2/core/mat.hpp
/usr/include/opencv2/core/eigen.hpp
/usr/include/opencv2/core/types_c.h
/usr/include/opencv2/core/core_c.h
/usr/include/opencv2/core/version.hpp
/usr/include/opencv2/core/internal.hpp
/usr/include/opencv2/core/operations.hpp
/usr/include/opencv2/core/core.hpp
/usr/include/opencv2/core/wimage.hpp
/usr/include/opencv2/video
/usr/include/opencv2/video/background_segm.hpp
/usr/include/opencv2/video/tracking.hpp
/usr/include/opencv2/imgproc
/usr/include/opencv2/imgproc/types_c.h
/usr/include/opencv2/imgproc/imgproc_c.h
/usr/include/opencv2/imgproc/imgproc.hpp
/usr/include/opencv2/objdetect
/usr/include/opencv2/objdetect/objdetect.hpp
/usr/include/opencv2/contrib
/usr/include/opencv2/contrib/contrib.hpp
/usr/include/opencv2/calib3d
/usr/include/opencv2/calib3d/calib3d.hpp
/usr/include/opencv2/ml
/usr/include/opencv2/ml/ml.hpp
/usr/include/opencv2/features2d
/usr/include/opencv2/features2d/features2d.hpp
/usr/include/opencv
/usr/include/opencv/cv.h
/usr/include/opencv/cxmisc.h
/usr/include/opencv/cxcore.h
/usr/include/opencv/cv.hpp
/usr/include/opencv/ml.h
/usr/include/opencv/cvaux.hpp
/usr/include/opencv/cvwimage.h
/usr/include/opencv/highgui.h
/usr/include/opencv/cxeigen.hpp
/usr/include/opencv/cvaux.h
/usr/include/opencv/cxcore.hpp
/usr/lib/opkg/info/opencv-dev.list
/usr/lib/opkg/info/libopencv-legacy-dev.list
/usr/lib/opkg/info/libopencv-video2.2.control
/usr/lib/opkg/info/libopencv-ml2.2.postinst
/usr/lib/opkg/info/libopencv-video2.2.postinst
/usr/lib/opkg/info/libopencv-imgproc2.2.control
/usr/lib/opkg/info/libopencv-highgui2.2.control
/usr/lib/opkg/info/libopencv-flann-dev.list
/usr/lib/opkg/info/opencv.control
/usr/lib/opkg/info/libopencv-video-dev.list
/usr/lib/opkg/info/libopencv-legacy-dev.control
/usr/lib/opkg/info/libopencv-flann2.2.postinst
/usr/lib/opkg/info/libopencv-flann2.2.control
/usr/lib/opkg/info/libopencv-objdetect2.2.postinst
/usr/lib/opkg/info/libopencv-imgproc-dev.control
/usr/lib/opkg/info/libopencv-imgproc-dev.list
/usr/lib/opkg/info/libopencv-ml-dev.list
/usr/lib/opkg/info/libopencv-calib3d2.2.postinst
/usr/lib/opkg/info/libopencv-objdetect2.2.list
/usr/lib/opkg/info/libopencv-contrib2.2.postinst
/usr/lib/opkg/info/opencv-dev.control
/usr/lib/opkg/info/libopencv-features2d-dev.list
/usr/lib/opkg/info/libopencv-features2d2.2.postinst
/usr/lib/opkg/info/libopencv-video2.2.list
/usr/lib/opkg/info/libopencv-legacy2.2.postinst
/usr/lib/opkg/info/libopencv-calib3d-dev.control
/usr/lib/opkg/info/libopencv-core-dev.list
/usr/lib/opkg/info/libopencv-calib3d2.2.control
/usr/lib/opkg/info/libopencv-features2d2.2.control
/usr/lib/opkg/info/opencv.list
/usr/lib/opkg/info/libopencv-contrib2.2.list
/usr/lib/opkg/info/libopencv-highgui2.2.postinst
/usr/lib/opkg/info/libopencv-gpu-dev.control
/usr/lib/opkg/info/libopencv-objdetect2.2.control
/usr/lib/opkg/info/libopencv-gpu-dev.list
/usr/lib/opkg/info/libopencv-imgproc2.2.postinst
/usr/lib/opkg/info/libopencv-gpu2.2.postinst
/usr/lib/opkg/info/libopencv-contrib-dev.control
/usr/lib/opkg/info/libopencv-objdetect-dev.control
/usr/lib/opkg/info/libopencv-highgui2.2.list
/usr/lib/opkg/info/libopencv-flann-dev.control
/usr/lib/opkg/info/libopencv-legacy2.2.list
/usr/lib/opkg/info/libopencv-highgui-dev.list
/usr/lib/opkg/info/libopencv-calib3d-dev.list
/usr/lib/opkg/info/libopencv-highgui-dev.control
/usr/lib/opkg/info/libopencv-core2.2.control
/usr/lib/opkg/info/libopencv-contrib2.2.control
/usr/lib/opkg/info/gst-plugin-opencv.control
/usr/lib/opkg/info/libopencv-calib3d2.2.list
/usr/lib/opkg/info/libopencv-core2.2.postinst
/usr/lib/opkg/info/libopencv-contrib-dev.list
/usr/lib/opkg/info/gst-plugin-opencv.list
/usr/lib/opkg/info/libopencv-core-dev.control
/usr/lib/opkg/info/libopencv-features2d2.2.list
/usr/lib/opkg/info/libopencv-gpu2.2.control
/usr/lib/opkg/info/libopencv-ml2.2.list
/usr/lib/opkg/info/libopencv-features2d-dev.control
/usr/lib/opkg/info/libopencv-ml-dev.control
/usr/lib/opkg/info/libopencv-flann2.2.list
/usr/lib/opkg/info/libopencv-video-dev.control
/usr/lib/opkg/info/libopencv-core2.2.list
/usr/lib/opkg/info/libopencv-gpu2.2.list
/usr/lib/opkg/info/libopencv-ml2.2.control
/usr/lib/opkg/info/libopencv-imgproc2.2.list
/usr/lib/opkg/info/libopencv-legacy2.2.control
/usr/lib/opkg/info/libopencv-objdetect-dev.list
/usr/lib/gstreamer-0.10/libgstopencv.so
/usr/lib/libopencv_gpu.so.2.2.0
/usr/lib/pkgconfig/opencv.pc
/usr/lib/libopencv_core.so.2.2
/usr/lib/libopencv_objdetect.so.2.2.0
/usr/lib/libopencv_legacy.so.2.2.0
/usr/lib/libopencv_imgproc.so.2.2
/usr/lib/libopencv_video.so.2.2.0
/usr/lib/libopencv_imgproc.so
/usr/lib/libopencv_core.so.2.2.0
/usr/lib/libopencv_contrib.so
/usr/lib/libopencv_video.so.2.2
/usr/lib/libopencv_imgproc.so.2.2.0
/usr/lib/libopencv_contrib.so.2.2
/usr/lib/libopencv_flann.so.2.2
/usr/lib/libopencv_highgui.so.2.2
/usr/lib/libopencv_legacy.so.2.2
/usr/lib/libopencv_highgui.so.2.2.0
/usr/lib/libopencv_calib3d.so.2.2.0
/usr/lib/libopencv_ml.so.2.2
/usr/lib/libopencv_flann.so
/usr/lib/libopencv_calib3d.so
/usr/lib/libopencv_ml.so.2.2.0
/usr/lib/libopencv_highgui.so
/usr/lib/libopencv_video.so
/usr/lib/libopencv_contrib.so.2.2.0
/usr/lib/libopencv_core.so
/usr/lib/libopencv_objdetect.so.2.2
/usr/lib/libopencv_calib3d.so.2.2
/usr/lib/libopencv_legacy.so
/usr/lib/libopencv_features2d.so.2.2.0
/usr/lib/libopencv_objdetect.so
/usr/lib/libopencv_gpu.so
/usr/lib/libopencv_features2d.so
/usr/lib/libopencv_features2d.so.2.2
/usr/lib/libopencv_gpu.so.2.2
/usr/lib/libopencv_flann.so.2.2.0
/usr/lib/libopencv_ml.so


The code is said to have worked in another machine.

Do you have any idea where the problem situates and how to solve it?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

Scott Ellis
You didn't tell the linker about the opencv libraries.

http://opencv.willowgarage.com/wiki/CompileOpenCVUsingLinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gumstix website down ?

kris duff
Hello

Trying to learn about the yocto project, a lot of files on gumstix.com are not available, ie : http://www.gumstix.org/software-development.html

Thank you

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gumstix website down ?

Trung Hoang
AFAIK, there is only one document on the gumstix.org website about the yocto project. http://gumstix.org/software-development/open-embedded.html

The rest I've been told is out of date with the yocto system. 



On 24/01/2013, at 12:48 AM, kris duff <[hidden email]> wrote:

Hello

Trying to learn about the yocto project, a lot of files on gumstix.com are not available, ie : http://www.gumstix.org/software-development.html

Thank you
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gumstix website down ?

Akram Hameed
In reply to this post by kris duff
Kris,

This stuff has been happening to me too, lately. The pages are there, most of the time, but just lately things have been a little flaky...

On Thu, Jan 24, 2013 at 12:48 AM, kris duff <[hidden email]> wrote:
Hello

Trying to learn about the yocto project, a lot of files on gumstix.com are not available, ie : http://www.gumstix.org/software-development.html

Thank you

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

Kobja
This post has NOT been accepted by the mailing list yet.
In reply to this post by Kobja
hey squatters !!! haha

still struggling :

someone give a this code

CC = gcc
CFLAGS = -Wall -Wno-unused-function

CXXFLAGS += `pkg-config opencv --cflags`

LDFLAGS +=  `pkg-config opencv --libs`

TARGET = cam


$(TARGET): $(TARGET).c
        $(CC) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $(TARGET).c -o $(TARGET) -O3 -mtune=cortex-a8 -march=armv7-a -ftree-vectorize
-mfpu=neon -mfloat-abi=softfp -ffast-math -fomit-frame-pointer -funroll-loops


clean:
        rm -f $(TARGET) flipped.jpg
called Makefile



root@omap3-multi:~# make
gcc -Wall -Wno-unused-function `pkg-config opencv --cflags` `pkg-config opencv --libs` cam.c -o cam -O3 -mtune=cortex-a8 -march=armv7-a -ftree-vectorize


root@omap3-multi:~# ./cam
HIGHGUI ERROR: V4L2: device /dev/video0 is unable to capture video memory.
Unable to stop the stream.: Invalid argument
Unable to stop the stream.: Bad file descriptor
HIGHGUI ERROR: V4L: device /dev/video0: Unable to query number of channels
ERROR: capture is NULL
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

Kobja
This post has NOT been accepted by the mailing list yet.
more details:

root@omap3-multi:~# pkg-config --cflags opencv
-I/usr/include/opencv  
root@omap3-multi:~# pkg-config --libs opencv
-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
it seems to correspond to what's in the link (except a bit for the second querry)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

Scott Ellis
You have a different problem now.

It looks like OpenCV is not happy with /dev/video0. That's the default when you
don't specify the V4L2 interface for OpenCV to use.

What kernel are you using?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

Kobja
This post has NOT been accepted by the mailing list yet.
Angstrom v2011.12

Angstrom v2011.11
Built from branch: gnome-r13
Revision: 565562c
Target system: arm-angstrom-linux-gnueabi

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: opencv and caspa

zoso1234
run
uname -a
it should tell you the kernel version..most of the caspa stuff that works right off the bat is based off the 2.6.34 kernel.

also if you run lsmod and you don't see the mt9v032 then the sensor isn't supported in the kernel
Loading...