I have a line sensor with a $n$ number of detector elements, pixels. This line sensor should be used to capture data while moving so that later from the captured data images can be generated. The sensor is moved vertically when the line is horizontally so that with both axes data is captured.
Now to accurately generate an image with the line sensor data, what possibilities are there for sensors to be used? I was looking at MEMS sensors specifically accelerometers and magnetometers to capture some reference data. But for generating images, either the position or velocity of the sensor at specific time points is needed and accelerometer data would need to be (double) integrated - resulting in integration error. Or is there any other way to use the acceleration data?
Are there any other sensor types that can be used and don't need to interact with the environment - meaning like a wheel for capturing the velocity the line sensor is moving (when moving over hard surfaces). Looking for a resolution of 1mm... Any suggestions?
Edit: To specify, the system is housed in an enclosed case and not able to interact with its surrounding. Rather than moving something the system is moved. Like on a driving robot.