We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Ciao everyone!
I am tring to have an oc-tree from pointclouds of kinect.
Problem I had, was convert the kinect.depthMapRealWorld()
that is PVector array, to a Vec3D because I am usin Toxiclibs library.
Finally I have a Vec3D array with all points inside.
Now I have another big problem.
If I use
tree.addAll(new ArrayList(toxVecs.length));
it draw me only one cube of the octree and not all points.
Instead if i write
for (int i = 0; i < toxVecs.length-1; i++)
{
tree.addPoint(toxVecs[i]);
}
i receive the "Java heap error"!!
toxVecs [] is my array with all pointclouds inside.
Help me please, don't leave me alone!
Thank you,
Dam
Answers
A heap error probably means that you're trying to create a lot of new objects. Like, a lot of them. And the computer just can't find the space to make them all. How many points are we talking about here?
Thank you @TfGuy44.
Yes i soved yet yesterday incrementing the "i" steps at
i+25
it works (slowly of course).The number of points it is about 307200.
There is another strategy for improve the number of points and performance? A guy told me about "Multithreading". It can work?
Thanks,
Dam
thank you @GoToLoop!!
Disclaimer: Threading isn't for the faint of heart! :-t
frameRate(60)
FPS (~ 16ms).https://processing.org/reference/thread_.html
frameRate(1)
FPS while circleThread() sleepsdelay(INTERVAL)
milliseconds.And b/c sharedImg is
volatile
, other threads can see that re-assignment ASAP.If you wanna get deeper into threading further, it's better you open a separate "Ask a Question".
http://docs.oracle.com/javase/tutorial/essential/concurrency/index.html
Wow! Thank you.
It look very hard topic. I will study your message and in case I will find some problem I will open a new topic as you suggest me.
Thank you!