To get the compile options,
$ pkg-config opencv --cflags --libs
-I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml -lcxcore
Include the above in eclipse project properties.
Thursday, March 4, 2010
Tuesday, March 2, 2010
Compiling programs that use GSL
GCC:
$ gcc myprogram.c `pkg-config --cflags --libs gsl` -o myprogram
Eclipse:
add compiler / linker settings (alt+enter) to match (individually -I -L -l ...fileds)
$ pkg-config --cflags --libs gsl
-I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas -lm
$ gcc myprogram.c `pkg-config --cflags --libs gsl` -o myprogram
Eclipse:
add compiler / linker settings (alt+enter) to match (individually -I -L -l ...fileds)
$ pkg-config --cflags --libs gsl
-I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas -lm
Eclipse and SVN (dont use eclipse tools - use cmdline svn)
1 All eclipse svn methods failed and/or too messy
2 manually svn ci into some dir (~/svnworking)
3 create new eclipse workspace ~/eclipse_workspace_svnworking
4 switch to that
5 in eclipse Import> General > Existing project into workspace (select dir from ~/svnworking which was previously checked out manually using svn)
6 this will change the code in ~/eclipse_workspace_svnworking directly
7 svn ci as usual from a terminal
2 manually svn ci into some dir (~/svnworking)
3 create new eclipse workspace ~/eclipse_workspace_svnworking
4 switch to that
5 in eclipse Import> General > Existing project into workspace (select dir from ~/svnworking which was previously checked out manually using svn)
6 this will change the code in ~/eclipse_workspace_svnworking directly
7 svn ci as usual from a terminal
Wednesday, December 9, 2009
Eclipse C / OpenGL tips
Importing existing C Makefile projects
Create New Project > C Project > Makefile project
To Debug using eclipse add to CFLAGS in Makefile
-g -O0
OpenGL and Eclipse Debug(gdb?) works
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-linux-gtk.tar.gz&url=http://download.eclipse.org/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-linux-gtk.tar.gz&mirror_id=1
OpenGL Superbible (3edn) and code
http://proquest.safaribooksonline.com/0672326019/ch01?reader=html#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTA2NzIzMjYwMTkvY2gxNWxldjJzZWMxMiZpbWFnZXBhZ2U9
Create New Project > C Project > Makefile project
To Debug using eclipse add to CFLAGS in Makefile
-g -O0
OpenGL and Eclipse Debug(gdb?) works
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-linux-gtk.tar.gz&url=http://download.eclipse.org/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-linux-gtk.tar.gz&mirror_id=1
OpenGL Superbible (3edn) and code
http://proquest.safaribooksonline.com/0672326019/ch01?reader=html#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTA2NzIzMjYwMTkvY2gxNWxldjJzZWMxMiZpbWFnZXBhZ2U9
Wednesday, October 21, 2009
Blender Aim the Cam
To make one or more objects track another object (the target) select at least two objects and press CtrlT. The active object becomes the target and the others objects the trackers. The (Make Track Menu) provides several options for creating the initial tracking:
http://wiki.blender.org/index.php/Doc:Manual/Modelling/Objects/Tracking
http://wiki.blender.org/index.php/Doc:Manual/Modelling/Objects/Tracking
Tuesday, October 6, 2009
Read vertex cordinates in Blender3D
Blender can be used to read the coordinates of a desired vertex off a 3D model (Ex: 3ds)
1) Zoom in to the desired area (scroll button = zoom, middle drag = rotate, shift+middle = pan)
2) 'Tab' to enter 'edit' mode
3) Right click desired vertex
4) 'n' to see vertex coordinates
1) Zoom in to the desired area (scroll button = zoom, middle drag = rotate, shift+middle = pan)
2) 'Tab' to enter 'edit' mode
3) Right click desired vertex
4) 'n' to see vertex coordinates
Sunday, September 6, 2009
3D to 2D Rendering, OpenGL and MATLAB
Short notes on OpenGL rendering and attempted integration with MATLAB.
Vertex Buffer Objects (VBO)
MEX and OpenGL
Vertex Buffer Objects (VBO)
- Allows you to give vertex, vertexnoms, face array locations directly for openGL to render (as opposed to drawing triangles one by one)
- Allows you to draw to a buffer/texture (without directly to the screen)
MEX and OpenGL
- Use mex -v -lGL -lglut -lGLU cfile.c
- Problems with glutinit() when calling mex file (MATLAB crashes when mex file is caleld again - cant do repeated rendering/calculations)
- Probably not possible?
- http://www.mathworks.com/matlabcentral/newsreader/view_thread/166039
- http://mathforum.org/kb/message.jspa?messageID=6145127&tstart=15
Subscribe to:
Posts (Atom)