Today I checked the codes and realized the application crashed yestereday due to a missing declaration for an IplImage variable before it was being used by another method.
After I run the application, I realised that the cube is still very slow in its turining.
After some trying, I swapped the processing of the rubic cube with the position of the codes that copy the captured image from the camera to another variable, but realised it is still the same.
I then decided to try putting the reading of the image from the camera and the processing of the image into the one separate thread, letting the main thread do the 3D drawing. This fixed the problem and now the cube draws at an acceptable speed.
However, I am now having memory leaks in the application. I used a tool called Leak and realised that during the runtime, the program can take up to 1.5gb and still growing amount of ram before it crashed. Could not find the loophole in the code today, and I will attempt to work on this tomorrow.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment