Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of skinGames_forktest by
Diff: classLaserSensingTrajectory.cpp
- Revision:
- 34:1244fa3f2559
- Parent:
- 33:43e8bc451ef0
- Child:
- 36:233b12d0b1f0
--- a/classLaserSensingTrajectory.cpp Mon Nov 05 06:08:35 2012 +0000 +++ b/classLaserSensingTrajectory.cpp Wed Nov 07 14:41:55 2012 +0000 @@ -36,15 +36,18 @@ switch(modeThreshold) { case AUTO: if (minI==0) minI=1; - if (maxI<min_acceptable_intensity) autoThreshold=255;// (we consider that the saccade is FULL on something black) + if (maxI<min_acceptable_intensity) autoThreshold=255;// (we consider that the saccade is FULL on something black - this is noise) else if (1.0*maxI/minI > min_contrast_ratio ) { autoThreshold = (unsigned char) (1.0 * (maxI-minI) * threshold_factor + minI); // threshold_factor = 2/3 or 1/2 is a good value. } else {// ... otherwise, we consider that the saccade is FULL on something white autoThreshold=0; } + break; case FIXED: autoThreshold=fixedThreshold; + break; } + // Segment the trajectory (only two levels for the time being, but we can have more - meaning different forces, real or even complex values to have different angle forces...): // NOTE: if using 1 and -1 instead of 1 and 0, we can avoid having to add a "blob internal pressure"! -1 means a force towards the interior, and +1 outwards...