An in-vivo device may capture images of the GI system and transfer frames to an external system for analysis. As frames are transferred from the in-vivo device to the external system each frame may be scored as belonging to a first GI section or to a second GI section, and the frame scores may be buffered in a score buffer. Based on shifting of a reference function across the buffered frame scores and calculating distances between the buffered frame scores and the shifted reference function, the time at which the in-vivo device transitions from the first section of the GI system to the second section of the GI section may be determined.