visual3d:documentation:pipeline:signal_commands:create_target
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
visual3d:documentation:pipeline:signal_commands:create_target [2024/07/17 15:42] – removed sgranger | visual3d:documentation:pipeline:signal_commands:create_target [2024/07/17 15:46] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Create Target ====== | ||
+ | |||
+ | In Visual3D Version 5.02.07 we introduced a command to add a new ORIGINAL TARGET to the workspace. | ||
+ | |||
+ | **Create_Target** | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | **;** | ||
+ | The Expression can be any expression that produces a signal that has at least 3 components. The first 3 components will be used for the TARGET. | ||
+ | |||
+ | If the signal has one frame of data, all MoCap frames will be populated with this value. | ||
+ | |||
+ | **Create_Target** | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | **;** | ||
+ | If the signal has multiple frames, all frames will be populated up to the number of MoCap frames. | ||
+ | |||
+ | If there are fewer frames than MoCap frames, the target will be buffered with unreliable data. | ||
+ | |||
+ | **Create_Target** | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | **;** | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ===== Example: Virtual Lab ===== | ||
+ | |||
+ | ==== Background ==== | ||
+ | |||
+ | The following example creates a virtual lab that can have **4 principal directions** depending on the walking direction in the movement trial. Unlike the method for two directions, this method will only work for one direct per movement trial (e.g. the subject cannot walk back and forth in the same trial). It will, however, allow a virtual lab to have different orientations for each movement trial. | ||
+ | |||
+ | For the [[Visual3D: | ||
+ | |||
+ | To complete this tutorial, a static trial with the typical [[Visual3D: | ||
+ | |||
+ | ==== Script ==== | ||
+ | |||
+ | This pipeline should be run immediately after the model_template has been applied (at least in this example). | ||
+ | |||
+ | The script below can also be downloaded as a v3s file [[http:// | ||
+ | |||
+ | A virtual lab was created with a LANDMARK named LAB_LATERAL | ||
+ | < | ||
+ | ! A unit vector is defined between the right and left hip landmarks, | ||
+ | ! then rounded to yield 4 possible solutions ( +/- X-axis and +/- y-axis) | ||
+ | |||
+ | ! A target is created that contains that unit_vector at every frame of data. | ||
+ | |||
+ | !!The virtual_lab will be tracked by the new TARGET. | ||
+ | |||
+ | |||
+ | ! Create a unit vector between left and right hips | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | (LANDMARK:: | ||
+ | (LANDMARK:: | ||
+ | (LANDMARK:: | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! compute the median value of the unit vector | ||
+ | |||
+ | Metric_Median | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! round the floats to an integer | ||
+ | |||
+ | Evaluate_Expression | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! create a new TARGET that has the rounded unit vector at every frame. | ||
+ | |||
+ | Create_Target | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ! if you are testing, you will need to recalc to update the virtual lab. | ||
+ | |||
+ | Recalc | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
visual3d/documentation/pipeline/signal_commands/create_target.1721230962.txt.gz · Last modified: 2024/07/17 15:42 by sgranger