In the first sentence, the important observation is that the sheep crossed the road. What was seen is the crossing. The fact that I’ve seen sheep is (mostly) irrelevant.
In the second sentence, the relevant is that the police spotted him. What was seen is him. The last part of the sentence merely specifies the conditions, but they are considered less relevant. It could be rephrased like this:
La police l’a aperçu. Il était en train d’entrer dans un laboratoire médical.
The following is also correct and slightly different:
La police l’a aperçu entrer dans un laboratoire médical.
The focus here is on “he entered the lab”. It lessens the importance of the fact he was spotted. It might even suggest that the trespass is the (or part of the) transgression.
The “infinitive” is as the name implies nonfinite (but in French called “mode impersonnel”); the present participle is another nonfinite form of the verb, but it is far from being as “malleable” as the infinitive, it is quite restricted as it has right away the value of an adjective. There is the essential difference when we consider the two in real sentences : the first is in relation with other verbs, whereas the second is in relation with nouns.
The difference is then to be sought in the type of verb that introduces the action taking into account the scope those two verbal nonfinite forms have.
There is a rule that says that after verbs that express the idea of a perception you use the infinitive (ref);
verbs of perception (ref) : regarder, apercevoir , écouter, voir, sentir, entendre
However, there is an exception, you do not use the infinitive with the verb “apercevoir”; this can be verified in the ngrams for current verbs;
There is an exception to this usage and it is confirmed by the TLFi;
(caratères gras et italique ajoutés)
I A 2. Plus rarement. Sans effort d’attention, ni recherche
… Aimé regarda son père. Soudain, il l’aperçut vieilli.
SYNT. Apercevoir tout à coup, brusquement, soudain, pour la première fois.
− Insolite. [Suivi de l’inf., p. anal. avec voir + inf.]
7. Il vénérait Verhaeren. (…) Il aimait, (…) en retrouver à tout instant les larges visions tragiques : le moulin, dont les bras, … comme des bras de plainte, se sont tendus, et sont tombés … Les astres qui, là-haut, semblent les feux de grands cierges, tenus en main, dont on n’aperçoit pas monter la tige immense.
Rem. Apercevoir s’oppose à regarder et à voir par l’aspect, qui dans tous ses emplois est perfectif, c’est-à