ICS中关于面部识别的HAL层代码,其中一段讲人脸方向和sensor引起旋转之后边界关系的注释,很有爱啊,哈哈:
/**
/ * When device is 180 degrees oriented to the sensor, need to translate
/ * the output from Ducati to what Android expects
/ * Ducati always gives face coordinates in this form, irrespective of
/ * rotation, i.e (l,t) always represents the point towards the left eye
/ * and top of hair.
/ * (l, t)
/ * ---------------
/ * - ,,,,,,, -
/ * - | | -
/ * - |<a <a| -
/ * - (| ^ |) -
/ * - | -=- | -
/ * - \_____/ -
/ * ---------------
/ * (r, b)
/ *
/ * However, Android expects the coords to be in respect with what the
/ * sensor is viewing, i.e Android expects sensor to see this with (l,t)
/ * and (r,b) like so:
/ * (l, t)
/ * ---------------
/ * - _____ -
/ * - / \ -
/ * - | -=- | -
/ * - (| ^ |) -
/ * - |a> a>| -
/ * - | | -
/ * - ,,,,,,, -
/ * ---------------
/ * (r, b)
*/