1. A monitoring device which generates and outputs output moving images, where person areas which are detected from captured moving images in a monitoring area are changed to mask images, the device comprising: a processor, and a memory which stores instructions, wherein a configuration when the processor executes the instructions which are stored in the memory, includes: a person image analyzer which has a person detector which detects people from the captured moving images and acquires positional information which relates to the person areas, and an area state determinator which determines the area states which show the state of people in the person area based on the positional information; a mask image setter which sets the mask image which corresponds to the area state; and a moving image output controller which generates and outputs the output moving images where person areas are changed to the mask images which correspond to the area state based on the positional information and the area states which are output from the person image analyzer.