1. An image processing apparatus comprising: an image feature outputting unit that outputs each of image features, which are formed as features of a plurality of feature points of images of each frame in data of an input moving image, in correspondence with a time of the frame; a foreground estimating unit that estimates a foreground image at a time s by executing a view transform as a geometric transform on a foreground view model having the image feature of a foreground image in the image as a parameter in regard to the image feature at the time s, and then outputs an estimated foreground view; a background estimating unit that estimates a background image at the time s by executing a view transform as a geometric transform on a background view model having the image feature of a background image in the image as a parameter in regard to the image feature at the time s, and then outputs an estimated background view; a synthesized view generating unit that generates a synthesized view by synthesizing the estimated foreground view and the estimated background view; a foreground learning unit that learns the foreground view model based on an evaluation value obtained by comparison between the synthesized view and the image feature at the time s by updating the parameter of the foreground view model based on a stochastic generation model; and a background learning unit that learns the background view model based on the evaluation value by updating the parameter of the background view model based on a stochastic generation model.