Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a large number of paper sheets to scan. Instead of an autofeed or flatbed scanner, I'd like to use my photo camera. After a while, it occurred to me that instead of making a photo for each page, I could install the camera on a tripod, set it to record video and then extract the images from the video.

That way, I'd just have to handle the papers: Pick one, place it in front of the camera, wait a moment, replace it.

Is there a Linux software to get all images without motion out of a movie? Kind of a non-motion-detection.

share|improve this question

closed as off-topic by Nifle, DragonLord, Kevin Panko, Matthew Williams, Raystafarian Dec 8 at 12:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Nifle, DragonLord, Kevin Panko, Matthew Williams, Raystafarian
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

I like your idea. I guess I've found a way to do what you want.

Using ffmpeg to export frames at a given interval

You could install ffmpeg and then convert the video into still frames.

ffmpeg -i input_file.mp4 -r 1 image_%4d.png

Controlling frame rate

The -r option takes one number as a parameter, namely the frame rate. So the argument for this option would be 1 divided by the time you hold the sheets in front of the camera.

For example:

  • Picking a paper every second, use -r 1.
  • Picking a paper every two seconds, use -r 0.5 – because 0.5 frames per second mean 2 seconds per frame.
  • ...

You would only have to synchronize this with your start time, so I'd suggest using a stopwatch.

Shifting the starting position

You can also "shift" the video by using -ss <some number>, where <some number> is the time in seconds from the start of the video. So using -ss 5 would start at five seconds.

If you need to shift it more precisely, using a hh:mm:ss.xxx syntax, thus specifying milliseconds in xxx, for example like 00:00:00.500.

Controlling output names and format

You can change the image_%4d.png to use more digits. %4d will output images like 0001, 0002, and so on. So this should be enough for most cases.

ffmpeg can also output to JPG, so you'd just have to change the suffix accordingly. I suggest using PNG though, for quality reasons.

Some tips

Try to use proper lighting. Set up a direct light source to the paper and set the camera to high contrast. You would maybe need to batch-edit the output files in order to crop them, remove color tint and sharpen them up.

You could use IrfanView to batch process them, or use a trial version of Adobe Lightroom.

share|improve this answer
+1 for the general direction of the answer. What I'd like is a way to find duplicate/very similar frames and keep only those. –  Aaron Digulla Jun 26 '11 at 18:02
I'll have to look into that! If you keep to the time though you shouldn't get duplicates. –  slhck Jun 26 '11 at 18:08
But it's hard to keep to the time. Sometimes, I have to leaf through pages or check the backside, etc. It would be much more comfortable, if the software could simply extract the first frame of all duplicates. –  Aaron Digulla Jun 27 '11 at 7:56
I understand :) Well, I have an idea that uses ImageMagick, but it would involve a bit of programming -- unfortunately don't have the time for it in the next days. –  slhck Jun 27 '11 at 7:58

I am a professional VFX artist, and the best way to do it is just take stills. We still do this kind of thing on set for small pieces of film that need to look like live action but can't quite be filmed directly.

Even if you have a registration mark on your pages, it's hard to pull out the ones with motion blur. Your best bet (least time-consuming during AND after you take the images) really is still probably take a photo, move the page, hit the photo button again.

share|improve this answer
This should've been a comment. It's a valuable remark, but not an answer to the question. –  Jan Doggen Dec 5 at 18:47
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Dave M Dec 5 at 19:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.