extracting Magnitude and angle from flowfeature

1)I wanted to get all the pixels with some motion and wanted to store the position and angle in some data structure(Which data structure to use and how?).
Could anyone help me how I could do it.

2)Whether the below code is correct to extract the magnitude and direction of Optical Flow vector. If so how I can I do the operation mentioned in 1) from here on.

3)I find that the openCV manual could be supplemented with examples of the usage of different functions. I am not sure whether anyone else think the same.I think it will help new users. Now to write code I need to do lot of search on the net. :(. However community is having good response.

Comments

Berek: There was no problem. It was just that I did not know how to interpret the data as I did not understand the Mat object clearly. In fact I wanted to get the magnitude and direction of all the pixels with Optical flow.