1. A method by which a tracking apparatus tracks a target object in an image, the method comprising: acquiring a first tree structure indicating an order of analyzing a plurality of frames, each frame including a tracking area in which the target object is located; acquiring a plurality of frame groups, each frame group consisting of two frames, from the plurality of frames, and acquiring a distance evaluation value of each frame group; acquiring a second tree structure based on the first tree structure and the distance evaluation values; and tracking the target object based on the acquired second tree structure, wherein each distance evaluation value is determined based on at least one of locations of tracking areas included in two frames belonging to each frame group and pixel values in the tracking areas.