Itseez/opencv — pull request #1786 by SpecLad (2013-11-12 12:27:26+00:00)
Title: In the image sequence capture, only search for the ordinal in the file name

Searching in directory names can yield confusing results; e.g. if the input is "jpeg2000/image1.jp2", it will infer the pattern "jpeg%04d/image1.jp2", which is likely not what the user intended.

If the user really desires for the variable part to be in the directory name, it can always use an explicit pattern.