Loading...
Logo
Processing Forum
Roger Bohl's Profile
20 Posts
29 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    Now there is "Spam" next to each of my posts, which is inappropriate. As it appeared as soon as I changed my signature, it seems to be connected with that. My signature is not spam. Spam is advertising with commercial interest. I am neither advertising nor do I have commercial interest with my link. I just want to give kinect developers a common platform as it does not exist.
    Let's say you have a function

    void funct(int whatnot, int whatelsenot)
    {
    whatnot = whatelsenot;
    }

    having executed funct, if you access whatnot now from somewhere in the script, will it contain whatelsenot?

    If it is
    void funct(int whatnot, int whatelsenot)
    {
    int whatever = 4;
    whatnot = whatelsenot * whatever;
    }
    will you have access to whatever from anywhere in the script?
    ----------------------------------------
    http://orlandorath.cwsurf.de/forum/index.php - Kinect Development Forum
    How would you eliminate "jitter" in Kinect data, "smooth" it?:

    Picture an array of numbers, ie

    time1: 100,120,130
    time2: 102,120,132
    time3: 98,108,120

    The kinect exports at best 30fps. That means, the difference between time1 and time2 is 1/30 seconds at best. I would like to enter a smoothing factor, which removes measurement errors up to a given degree.

    Currently it is like this: I created a function which outputs an arraylist. So arraylist kinectvalues is given at best each 1/30 seconds. It contains 17 floats.

    How would you convert it into an arraylist that contains the smoothed values without taking much time?

    Smoothed arraylist could be

    time1: 101,120,131
    time2: 100,119,132
    time3: 100,118,131
    So let's say you had a textfile like

    1. name;description;number1;number2;number3;number4;.... ;numberN 
    2. name2;description2;...
    3. ...
    and a function that gives you an arraylist containing of number1, number2, ..., numberN

    How would you determine nameN which resembles the functions's output?

    Normally I don't do this, as it spoils the ideas I get but I want to share my approach with you hoping to find something better, as it is not reliable. My approach is
    1. Get the function's values
    2. Compare each value within a tolerance with each relating value(compare numberN_function with numberN_line_1 +- 100) (compare numberN_function with numberN_line_2 +- 100) etc.
    3. Output nameN when above gives true in more than 50 per cent, ie say N = 100 and 51 values are within boundaries, the software outputs true.
    The problem with my approach is that as soon as a similar group of numbers was found within the threshold, the software waits for the next call of function. So a lot of times I simply get the first row even though another row is closer. If I lower tolerance(ie less than 100), I often get no result.

    Best


    You have an arraylist. You access the items in it with

    arraylistname.get(index)

    but the result is an object. You want float. You write

    Float.valueOf( arraylistname.get( index ).toString().trim()).floatValue();

    and that works. But which approach would be easier, this seems to be overcomplicated.


    I have to write this down. I hate the java programming language. I am only using it because processing is the only kinect programming language that I am aware of that is free.

    I excelled in autohotkey, I excelled in Visual Basic and PHP and maybe even python. Instead of finally agreeing on one language every retard on this damn planet has to write his library for some overcomplicated language. The drivers for kinect have been out for quite a while and still people don't offer a simple approach for simple programming languages. All those retarded messages, the program just needs to take the code and needs to not be nitpicky about some forgotten variable I used without declaring.

    And what is worse, Java is STILL SLOWER than other programming languages. You deal with all the issues of the language itself for it to not even be faster than other languages.

    I just don't get it why people are still using this crap.

    Does this make sense?

    My goal is to make my hip the origin of ordinates. As there's only hip_left and hip_right given in a PVector, I calculate the middle. calculateAngleBetweenPoints means angle between imaginary lines of P1-P2 and P2-P3. Normal_ are normal vectors. I use the center of the knee to the center of the hip to form a rough normal to the ground.


    pushMatrix();
    hip.x = (hip_left.x+hip_right.x)/2;
    hip.y = (hip_left.y+hip_right.y)/2;
    hip.z = (hip_left.z+hip_right.z)/2;
    knee.x = (knee_left.x+knee_right.x)/2;
    knee.y = (knee_left.y+knee_right.y)/2;
    knee.z = (knee_left.z+knee_right.z)/2;

    HelperVector.x = hip.x * Normal_x.x;
    HelperVector.y = hip.y * Normal_x.y;
    HelperVector.z = hip.z * Normal_x.z;
    rotateY(radians(calculateAngleBetweenPoints(HelperVector, hip, hip_left)));
    HelperVector.x = -(knee.x - hip.x);
    HelperVector.y = -(knee.y - hip.y);
    HelperVector.z = -(knee.z - hip.z);
    rotateX(radians(calculateAngleBetweenPoints(HelperVector, hip, Normal_y)));
    translate(hip.x,hip.y,hip.z);

    Oh and why does point() not work if size(width,height,opengl) instead of  size(width,height)?
    I have a text file with something like

    fruit;value1;value2;value3
    strawberry;0;200;3
    banana;20;0;0

    and I have two variables in my code called strawberry and banana.

    If I split the file I get strawberry and banana as strings. But I want them to be variables.

    What I want to do is this(if line 2 is in arrayx):arrayx[0] = "Hello world" which should lead to the variable strawberry containing the string "Hello world".

    How do you use a string consisting of the same name as a variable in the code to act as this variable?
    There is a nice function called heapq.nlargest in python

    heapq.nlargest(n, iterable[, key])

    Return a list with the n largest elements from the dataset defined by iterable. key, if provided, specifies a function of one argument that is used to extract a comparison key from each element in the iterable: key=str.lower Equivalent to: sorted(iterable, key=key, reverse=True)[:n] 
    Is there something like that in processing?
    Has anyone coded something regarding that topic, yet?

    It means that you start a movement and before finishing it, your software already knows based on statistical data, what you are likely to do next. Speed of movement-independent.
    Without sharing my approach to not spoil the answers/give them a direction I want to know from you how you would do the following:

    FAAST ( http://projects.ict.usc.edu/mxr/faast/ ) is a kinect to key-press application. You have several options, for instance

    lean_left angular body lean left (degrees)
    lean_right angular body lean right(degrees)
    lean_forwards angualr body lean forwards (degrees)
    lean_backwards angular body lean back (degrees)
    turn_left angular amount of left body turn (degrees)
    ...

    an order looks like that:

    action_name action_threshold virtual_event_type virtual_event_name

    for instance

     lean_left 20 key_hold a

    Every time an action_threshold is reached the virtual_event_type is being conducted. 

    How would you write/structure software using simpleopenni in processing that lets the user conduct all movements he wants and outputs a list with orders of the 

    action_name action_threshold virtual_event_type virtual_event_name

     type that

    - contains all movements
    - amounts to least conflict with each other, so by doing the movement, no other thresholds should be reached

    So for instance if the player happens to move his foot to the front but also - unknowingly - moves his head to the side, something he does not do when doing other movements, instead of using the foot's movement, the software uses the head tilt.
    I have this:

    1. boolean circa(float Zahl,float UGW, float OGW)
      {
      if (Zahl > UGW) AND (Zahl < OGW)
      return true
      else
      return false

    It should return true if a value Zahl is in between UGW and OGW. Returns unexpected token return. Why?