| New Reply |
Statisics - linearity and best-fit in 3 dimensions |
Share Thread | Thread Tools |
| May13-12, 02:49 AM | #18 |
|
|
Statisics - linearity and best-fit in 3 dimensions
No, I am not interested in motion parallel to a tilted axis. Your understanding of my use of origin is also I think correct - in fact one operating mode of the gesture-tracking package specifically locks the coordinate system to body centroid and calculates all distances from there. So, to be absolutely accurate, origin should not be the feet but around waist level. However, a better solution would set origin from initial joint position - therefore, for any joint origin is set to first detected position in world coordinate system. This is again wishful thinking - if it overcomplicates the problem by all means pick a set origin around waist/navel level and go from there.
|
| May13-12, 10:00 AM | #19 |
|
Recognitions:
|
I'm having a hard time visualizing any practical problem where one would only care about motion parallel to one of the coordinate axes!
In an earlier post, you said |
| May13-12, 11:33 AM | #20 |
|
|
Well, after we have tested to see if they are indeed parallel then yes. In that post by direction I meant towards or away from origin. Sorry if that was unclear
Re application, think of a mouse or a keyboard. A "click" or "keystroke" only "moves" in one direction. Think of the 6 possible motions (3 axes, 2 directions) as 6 keystrokes. As I said, the 2d recognizer requires an init event to begin gathering data for recognition. The parallel motions will serve as init events. |
| May13-12, 03:06 PM | #21 |
|
|
I'd say using Pearson's r is not a good idea, for example, if a line is parallel to one of the axis you use to calculate it the correlation will be zero.
A PCA answers all your three questions at once, if it is a line you will have only one significant eigenvalue and its eigenvector will tell you if its parallel or not to any axis. For more info: http://en.wikipedia.org/wiki/Princip...onent_analysis |
| May13-12, 05:34 PM | #22 |
|
|
I have had pca suggested to me before. Could you please give an expression involving sums but not integrals or derivative, as the environment I'm working with does not support them? I have been unable to make my way through the wiki article (freshman calc etc).
Also, apologies in advance if this involves matrices and I ask some rookie questions - my matrix skills are kinda weak. Thanks again Joe |
| May14-12, 12:00 AM | #23 |
|
Recognitions:
|
The way I'm visualizing the data at present is that you not only have the problem of applying some test to a set of data, you have the problem of picking which sets of data to analyze. If I think of the data as a long series of vectors (x1,y1,z1,t1), (x2,y2,z2,t2).....(xn,yn,zn,tn) then this sequence may contain several different gestures. So you must picked out various "windows" of data to analyze. The data from t10 to t200 might be one gesture and the data from t315 to t390 might be another. Am I correct that picking out sequences of data is part of the problem? Have you solved that part of it already? Should we think of this as a non-real time system where we can scan back and forth in all the data? Or must the system work in roughly real time as data is coming in? |
| May14-12, 01:00 AM | #24 |
|
|
Your concept of "hand signals" is accurate, however selection of windows (if I understand you correctly) is inherently not part of the problem. Once an "init" "hand signal" is received we assume that whatever follows is a 2d gesture. All 2d gestures consist of an arbitrary (but equal) number of datapoints which are compared to a prerecorded library of gestures in realtime. The software then identifies the gesture (there is a tolerance value which tells the software how closely the input gesture must match the recorded gesture). Recording of 2d data continues until the "stop" "hand signal" is received. The "stop" "hand signal" is nothing more than the "init" "hand signal" reversed; that is to say whereas The "begin gesture" (init) "hand signal" moves away from the origin, the "stop" "hand signal" moves toward the origin along the same axis as the "init". When "stop" is received any points beyond the arbitrary preset length are discarded and 2d recognition occurs. I am not yet 100% sure I will need a stop (I may simply trigger recognition when the requisite number of points is received) but far easier to build it and not use it than try to build it later.
Example; 1) user moves hand up 2) 2d datapoint recording begins on the xz plane 3) user moves hand down or requisite length of xz dataset is reached 4) recognition occurred, result is handled, gesture listener resets. Re realtime, most definitely realtim Thanks again |
| May14-12, 01:18 AM | #25 |
|
|
|
| May14-12, 01:39 AM | #26 |
|
|
Max MSP
|
| May14-12, 01:41 AM | #27 |
|
|
the tutorial article wikipedial links to is actually far ,ore soothing than wikipedia itself. I may give it a shot later tonight.
|
| May14-12, 02:00 AM | #28 |
|
|
I'm sure Max MSP should be able to deal with that one... Good luck though!! |
| May14-12, 02:16 AM | #29 |
|
|
Don't know when I will get to try this way, but hopefully soon, and I definitely will need help. Thanks again.
|
| May14-12, 02:24 AM | #30 |
|
|
|
| May14-12, 02:39 AM | #31 |
|
Recognitions:
|
Let's discuss an utterly simple method. Perhaps objections to it will clarify the problem further.
Let the data points be [itex](x_i,y_i,z_i,t_i) [/itex] for [itex] i = 1 [/itex] to [itex] N [/itex]. If this data represented a line perfectly parallel to the y axis then the [itex] x [/itex] and [itex] z [/itex] values would remain constant while the [itex] y [/itex] value varied. If we have data from an imperfect line, we could estimate the line that the data is "trying to" follow in various ways. The simplest seems to be to estimate that the [itex] \hat{x} = [/itex] the average of the [itex] x [/itex] values in the data and [itex] \hat{z} = [/itex] the average of the [itex] z [/itex] values. We can quantify the "error" that the imperfect data has in various ways. The one that comes to my mind first [tex] \hat{\sigma^2} = (\frac{1}{N}) { \sum_{i=1}^N ( (\hat{x} - x )^2 + (\hat{z}-z)^2)} [/tex] Of course the idea is to classify the data as a gesture parallel to the y axis when [itex] \hat{\sigma^2} [/itex] is "small". What constitutes a small or large error would have to be determined empirically. You'd have to do a different test for each axis, but this is not an elaborate computation. One weakness of this method is that it doesn't give any more credit to data that is a perfect straight line but slightly out-of-parallel vs data that is scattered. Is this weakness the reason that you are considering sophisticated statistical methods? |
| New Reply |
| Thread Tools | |
Similar Threads for: Statisics - linearity and best-fit in 3 dimensions
|
||||
| Thread | Forum | Replies | ||
| linearity for a PDE | Calculus & Beyond Homework | 1 | ||
| Dimensions that are not space dimensions nor time dimensions. | General Physics | 14 | ||
| Linearity | Calculus & Beyond Homework | 4 | ||
| how to genarelize the vector product in three dimensions to higher dimensions? | Linear & Abstract Algebra | 2 | ||
| Distances between samples in high dimensions. Curse of dimensions? | Differential Geometry | 0 | ||