Sorry.I should explain that. They are two independent work with each other.
The one work is to get the data from camera and save it as images or other files.
The other work is to record the movement of hand while leap motion recognize hand.
They are two different works which I want to do now. Thanks!