I did some trials of using optical flow to measure distance travelled and whilst it worked well in natural light on surfaces with a reasonable degree of contrast, on limestone there are areas of rock with little contrast which confuse the optical flow software. The other issue is deep shadow - this appears as high contrast but as the light moves, the shadow "moves" giving a false amount of movement.
As far as accelerometers go, as ChrisJC said, it's the double integration that kills it (integrate once for velocity, again for displacement). You can do an easy and quite enlightening experiment - generate a column of random numbers between -1 and 1 in a spreadsheet so that the sum of the column is about zero. In the next column integrate (i.e. add the numbers in the first column) in the third column integrate again. With 20-30 values you will find that the third column runs off to some large value. The point of this is that the slightest amount of noise (from even the best accelerometers) will eventually be amplified into big errors.
One approach that I think may have some mileage is profile comparison (there was a link to a paper somewhere on this forum where this approach had been used with a submersible in a sump). What I mean by "profile comparison" is that you have two sets of sensors, one a fixed distance behind the other, that measure the profile of the passage. It is then possible to match the two profiles and determine the distance travelled. The obvious problem with this approach is that as the operator twists and turns, the rear set of sensors will be at a different angle to the profile than the front set of sensors were when they passed the same point. However it may be possible to use gyros to compensate for this...