robksawyer / bikinect

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

When lineIntersection() returns null grabbers are not visible #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run NecTouch
2. Move grabbers to create parallel lines

What is the expected output? What do you see instead?
The grabbers should be displayed. They disappear.

What version of the product are you using? On what operating system?
NecTouch v1.1

Please provide any additional information below.
lineIntersection() returns null when dealing with parallel lines. This causes 
the if condition
if (rightHorizon != null && leftHorizon != null)
to be false so the grabbers are not displayed.
Also, it causes null pointer exceptions if trying to calibrate.

Original issue reported on code.google.com by ignacioj...@gmail.com on 25 Mar 2013 at 4:16

GoogleCodeExporter commented 9 years ago
Yes i know that error,but the way the whole process is done makes this error 
really challenging to avoid.
As i don't want to be dependent of OpenCV 1.0, i'm not continuing the 
development of this version, i hope to get a new version with a new tracking 
process soon.

Original comment by bkuperb...@gmail.com on 9 Apr 2013 at 3:59

GoogleCodeExporter commented 9 years ago
There is a simple workaround for this issue. Sin grabbers position are set 
though mouse positions, they are integers, which produces division by zero in 
the intersection algorithm. By adding a small decimal part, say 0.0001, to one 
of the grabber's position in that case, the division by zero is avoided, and 
only a small error is introduced.

Regarding the OpenCV dependency, I have replaced it with Diewald cv kit, a pure 
Java library available at 
http://thomasdiewald.com/processing/libraries/diewald_CV_kit/
The process is really simple and straight forward and the library is pretty 
fast.

Regards,
Nacho (@kosowski_)
www.estudiolumen.com

Original comment by ignacioj...@gmail.com on 9 Apr 2013 at 4:25

GoogleCodeExporter commented 9 years ago
Yes, that makes sense !
Thanks for this quick workaround

Original comment by bkuperb...@gmail.com on 9 Apr 2013 at 4:29

GoogleCodeExporter commented 9 years ago
Can I have the operating software?, I would like to try the program, is very 
interesting, but I do not work, I install Java and I set your path and 
classpath, but nectouch not work, and I install the libraries of processing 
required (OpenCV, OpenNI, SDK kinect) but when I run the executable java 
process starts but does not open anything on the screen, do not know why it 
happens, maybe I miss a step, but I did not find any manual on how to install 
it, thanks a lot.

Original comment by dboli...@gmail.com on 25 Jun 2014 at 5:04