Here I will write, what I need to be sure that I can find again, and far more which I probarbly don't need to find again :)

Showing posts with label opengl. Show all posts
Showing posts with label opengl. Show all posts

Sunday, July 27, 2008

Epia EX1000 on ubuntu 8.04LTS

This weekend I didn't know what to do, so I decided to try play around with my crap epia machine and get some thought away from my master project...

It was already running fedora core 8, and I had downloaded the pre-upgrade to FC9, that didn't really go to well, and i ended up with a system that couldn't boot. Since Fedora is damn huge *and I don't have a dvd burner in my old stationare, I decided to try the new ubuntu 8.04LTS desktop edition.

Here's the list of things I have to remember when installing again.
* I had to specify VESA on the kernel promt to be able to boot to the installer.
* When installed, create a new boot entry without vesa to enable non-vesa drivers (I don't know if this is actually necessary)
* use the xorg.conf below to enable openchrome drivers

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by failsafeDexconf, using
# values from the debconf database and some overrides to use vesa mode.
#
# You should use dexconf or another such tool for creating a "real" xorg.conf
# For example:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
EndSection

Section "Device"
Identifier "unichrome"
# Driver "via"
Driver "openchrome"
Option "ActiveDevice" "LCD"
# Option "TVOutput" "S-Video"
# VideoRam 65536
# Insert Clocks lines here if appropriate
Option "VBEModes" "true"
Option "SWCursor" "true"
EndSection

section "Monitor"
Identifier "viewsonic"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Screen 1"
Device "unichrome"
Monitor "viewsonic"
DefaultDepth 24

Subsection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection


Section "ServerLayout"
Identifier "Default Layout"
screen 0 "Screen 1" 0 0
EndSection
Section "Module"
Load "glx"
Load "GLcore"
Load "v4l"
EndSection
Section "ServerFlags"
EndSection


*****************
Thats about it. Via seems to start to support the linux community, for some interessting reading about this see: Decent Linux Drivers: Seriously, what is going on? you will be shocked. And while we are at it if you already have a via graphics chip and have experienced some linux problem, why don't you sign the petition for decent linux drivers?

Tuesday, March 11, 2008

Object pose estimation

The Problem

For the chess robots, it would be nice if it could prepare a game off chess from scattered pieces, to be able to do this the robot must know what pieces are what and their orientation in 3D space to grab em.

Also dubbed object picking in 3D.


The Method

The plan is rather simple, Construct a 3D model consisting of few points for each chess piece, segment the silhouttes from the picking scene, fit the constructed model to the silhouttes. The Best fit should be the chess piece.


I assume that there from one image will be lots of problems obtaining a usefull silhoutte, therefore using multiple images and corelating the probability off the recovered models, could be a method for increasing detection rate.


Construction the model.

First silhoutte images was generated of key orientations. Images from the front and the side was acquired off the chess pieces. The silhoutte was segmented using a threshold and a search for the biggest blob. example of segmented knigh given below.


To mark the points of interes, the defining object points, a program to mark the pieces was/are being developed. The program uses OpenGL for the visuals, the planes can be dragged to the best position. Example image given below, also for the knight.

The above image shows the knight approximately aligned and with example points marked. It is not obvious from this image, but when the are rotated it is visible that the scale of the images is not correct right now. Images are currently always stretced to fit a square. Scaling them individually might be a sollution, the question is if I should use the original image sizes or make it possible to scale the images in the program.. Anyhow, on the next picture you can see the problem that the foot is not the same sice of both silhouttes, like they should be.

Marking program current features.
  • Optimized for chess pieces ( variable names in the code )
  • Transform the images in their respective planes.
  • Scale the images in their respective planes.
  • can rotate 3D object
  • nice vis using OpenGL custom shader
  • Can save/load parameters to/from file
  • Zooming ability of head and foot of pieces
TODO...

Nice to have features:
make it possible to rotate the planes, right now it looks like it is not required, but for feature completness off the programm it would be nice.

Known Bugs:
When an area is zoomed, the intersection of mouse click rays and the planes are wrong.

Wednesday, September 19, 2007

Solved ATI problems AX800pro ubuntu

Finally I got the graphics card working, I had it working with gentoo for a long time, and now also with ubuntu.

the final error message I zoomed in on after long time was.

From /var/log/Xorg.0.log
(EE) fglrx(0): [agp] unable to acquire AGP, error ""xf86_ENODEV""xf86_ENODEV""

from the kernel (dmesg):
[fglrx] Internal AGP is not supported in 2.6 kernel.

The sollution was found from here:
http://forum.ubuntuusers.de/topic/86634/30/

(even though I don't understand german :) )

This did the trick !
rm -fr /lib/modules/2.6.20-*-generic/kernel/drivers/edac

Ahh on to opengl programming.
Drawing a triangle...