Tastenkunst / brfv4_javascript_examples

BRFv4 - HTML5/Javascript - examples project. Reference implementation for all other platform example packages.
463 stars 148 forks source link

sending point data to 3rd party app... #40

Closed floatingworld3 closed 5 years ago

floatingworld3 commented 6 years ago

Hi, love your work... what is the full implementation of ; brfv4.__brf_get_opticalFlowPoints () that returns the vector data?

MarcelKlammer commented 6 years ago

That's an internal function. Optical Flow is just an additional feature which is able to track arbitrary points that you set on your own. Those points are not connected in any way and can get lost from a frame to frame tracking step. That's why you get

getOpticalFlowPoints() and getOpticalFlowPointStates()

Please take a look at the section here:

https://tastenkunst.github.io/brfv4_docs/#setOpticalFlowParams

And please take a look an actual implementation of Optical Flow

https://github.com/Tastenkunst/brfv4_javascript_examples/tree/master/js/examples/point_tracking

floatingworld3 commented 6 years ago

Thanks for your response...ah I guess then all i need is BRFFace and vertices[index 2]? is this called thru BRFFace.vertices[index2]? Sorry to bother you sir...I know you are not obliged to provide support.. In the console ...I get.. brfv4.BRFFace.vertices is undefined...I can't seem to find the vertices method that, according to your API docs, belong to BRFFace.. I guess my problem is that I don't know how to invoke the BRFFace class as in the example code which invokes the BRFManager

MarcelKlammer commented 6 years ago

Did you take a look at eg.: https://github.com/Tastenkunst/brfv4_javascript_examples/blob/master/minimalWebcam.html

handleTrackingResults gets eg faces (the list of BRFFace objects), in your case, there is one face in that list. And that tracking result holds vertices.

floatingworld3 commented 6 years ago

ah thank you sir... I understand. One last thing - I have created a websocket in a dll at localhost, port 8087 that I am using to send position data from your app to 3ds max. T The connection is established but then gets disconnected immediately. Does the cause fro this lie in your main js? Thanks for your time.

MarcelKlammer commented 6 years ago

I have no idea. Without knowing your complete implemented example, I can't tell.