Image analyzing apparatus and method, and program