An ultrasonic imaging apparatus and a method of controlling the ultrasonic imaging apparatus for obtaining an image of an object by efficiently removing noise from an ultrasonic image obtained using a contrast agent are provided. The ultrasonic imaging apparatus includes a display; and a controller configured to derive a difference between ultrasonic image signals including contrast agent signals obtained in a frame before and after at least one viewpoint, and to form an image of an object based on the difference between the ultrasonic image signals over time corresponding to the frame before and after at least one viewpoint and output the image of the object to the display.