Do you already have access to the Kinect data? If not, I would check out these tutorials here.
Edit: Alright, I understand your issue now. What you are describing with image processing does not really depend on ROS, I imagine you would be using OpenCV like you mentioned in original post.
Not sure how you are getting your frame data from Kinect, but just store it in a buffer array (allocate memory) and wait for the next frame and do the same (allocate memory). Then compute your image processing functions. Overwrite the old frame with the new frame, and obtain the next frame and store it in the new frame. Repeat. If you need more assistance with image processing, try a basic search online, there are many tutorials out there for it.
Originally posted by JoshMarino with karma: 592 on 2016-10-07
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by patrchri on 2016-10-08:
I have access, because I have implemented object detection with the object's color. I am also using Kinect v2.
Comment by JoshMarino on 2016-10-08:
Sorry, what I meant to ask is can you get the Kinect data through using ROS with something like openni_launch package? If so, it is a matter of subscribing to the topic (image data) and then using whatever algorithms you want to.
Comment by patrchri on 2016-10-09:
I can get data from another node....My issue is not the data...
Comment by JoshMarino on 2016-10-09:
I do not understand your problem then. You asked how read two frames from the Kinect, but you are saying you can already do that?
Comment by patrchri on 2016-10-09:
I am asking how to read two in a row frames and do something with their difference. This means that I have to keep one frame/message temporarily, get its following one, do something with these 2 frames/messages, discard the temporary message and do this process again...