wk1990ok / ehci

Automatically exported from code.google.com/p/ehci
0 stars 0 forks source link

Porting to mac os x / xcode #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have been trying to port your program to compile for mac os x under a xcode 
project.

For this I had to change some of your code.
I am not an expert in C/C++ so if you find I am wrong at some point please 
correct me.

Steps I have made:

1st: I changed most of your includes to a more dynamic style such as 
<OpenCV/OpenCV.h>, <OpenCV/highgui.h>.

2nd: I opted to remove the support for freeglut for the time being and changed 
the writing code to use standard glut library that is included 
with mac os x.

3rd: I had problems while linking files due to some declarations on ehtc.h. To 
solve this I moved some declarations to the .cpp files and 
flaged others as extern.

I have a prototype working version at the moment and including a zip with all 
the files attached fr your consideration.

Issues:

I am having issues while running the code.
The program runs properly for a bit (10-20 seconds) some times just a couple of 
seconds and breaks with the following error:

...
Old size 188 new size 187
ehci: Deleted 67
Ransac in action: updating modelPoints tp 186 mp 187
Erasing 67
Old size 187 new size 186
ehci: Deleted 114
Ransac in action: updating modelPoints tp 185 mp 186
Erasing 114
Old size 186 new size 185
ehci: Deleted 60
Ransac in action: updating modelPoints tp 184 mp 185
Erasing 60
Old size 185 new size 184
ehci: Deleted 13
ehci: Deleted 16
ehci: Deleted 54
ehci: Deleted 68
ehci: Deleted 136
Ransac in action: updating modelPoints tp 179 mp 184
Erasing 13
Erasing 16
Erasing 54
Erasing 68
Erasing 136
Old size 184 new size 179
ehci: Deleted 127
Ransac in action: updating modelPoints tp 178 mp 179
Erasing 127
Old size 179 new size 178
ehci: Deleted 159
Ransac in action: updating modelPoints tp 177 mp 178
Erasing 159
Old size 178 new size 177
ehci: Deleted 110
Ransac in action: updating modelPoints tp 176 mp 177
Erasing 110
Old size 177 new size 176
ehci: Deleted 20
Ransac in action: updating modelPoints tp 175 mp 176
Erasing 20
Old size 176 new size 175
ehci: Deleted 3
Ransac in action: updating modelPoints tp 174 mp 175
Erasing 3
Old size 175 new size 174
/usr/include/c++/4.2.1/debug/vector:198:error: attempt to subscript 
    container with out-of-bounds index 173, but container only holds 173     
    elements.

Objects involved in the operation:
sequence "this" @ 0x0xbfffeed4 {
  type = NSt7__debug6vectorI12CvPoint2D32fSaIS1_EEE;
}

Any Idea of what would be causing this problem?
Have you faced with the same problem before?

Original issue reported on code.google.com by JonnyB...@gmail.com on 31 May 2010 at 4:25

Attachments:

GoogleCodeExporter commented 8 years ago
I detected that the error I describe above occurs when moving the head fast in 
front of the camera.

Original comment by JonnyB...@gmail.com on 31 May 2010 at 4:29

GoogleCodeExporter commented 8 years ago
Actually, this is a bug.
A fast workaround would be to disable ransac in the config.ini file.
In order to do so, just create a data directory with a config.ini file, like 
this:
yourapp/youExecutable.exe
yourapp/data/config.ini
In the config file, put something like:
USE_RANSAC 0
RANSAC_SAMPLES 6
RANSAC_DISTANCE_THRESHOLD 30.0
RANSAC_ITERATIONS 20
CAMERA_INDEX 0
OPEN_MOVIE NO
And you should be fine, while the bug is not corrected.

Original comment by danielba...@gmail.com on 17 Jun 2010 at 5:25