= RDR Colour Calibration =

== What is it? ==
A new method of doing colour calibration is coined by Claude, which uses [wiki:RippleDownRules Ripple Down Rules] to train the calibration interactively.

== How can I get it? ==
 * The first working version tool called rc is comitted in svn @ {{{trunk/base/colour/rc}}}. 
 * You also need to get xerce Java library in {{{trunk/lib/xerce_2_6_2}}}. Put the jar file any where in your {{{CLASSPATH}}}.

== How to run? ==
{{{java rc}}}

== How to use? ==
There're 2 ways to use it, either from offline images and online (interactively with the dog).

 * Training from offline images
   * Open BFL (see [wiki:BflFileFormat BFL file format])
   * Select colour 
   * Label the image, the result is altered as soon as you label new pixel.

 * Training online with the dog
   * Boot the dog
   * Run the RoboCommander base : java !RoboWirelessBase 0 1 0 0 0 0 1 (or SimpleRoboCommander)
   * Let the RC listen to YUV port: click on "Listen To Dog" button (you'll see a ready message in the console)
   * Run client with corresponding ports : ./client 0 1 0 1 0 0 1 ( the 4th one is for YUV transmision).
   * In RC, tick on "Read Stream".
   * You can either send YUV plane "on demand" by clicking "Send YUV" in !SimpleRoboCommander/!RoboCommader, or "programmable" in Python by calling "sendYUV()" method.
   * If "Use RDR" is checked, the cplane is deducted from RDR rules, otherwise, it's just what the dog thinks.
   * Train the RDR
   * When you're satisfied, stop streaming, save RDR Rule, Save NNMC.cal to disk.
   * Use FTP Tools to transfer nnmc.cal to the dog.
   * Reload NNMC table by calling "reloadNNMC()" method in Python. (2004/Remote.py can do this).
   * Open CPlane tools to investigate the results.

== Tips ==
 * In RC, click on "All" (colours) to see the full cplane.
 * You can control the head of the dog USING THE TAIL! This feature is borrowed from CMU team. Remote.py player let you do this. You just have to set PID control for the tail to Zero to freely move it. It's in actuatorControl/!EffectorCommander.cc.



TO BE CONTINUED....