Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Camera Focus / different AF methods

Johannes Baiter's Spreads and SpreadPi are the latest control systems and postprocessors for DIY scanning. http://spreads.readthedocs.org
Post Reply
User avatar
Aegre Reminiscens
Posts: 33
Joined: 04 Mar 2014, 00:53
E-book readers owned: kindle
Number of books owned: 0
Country: Germany
Contact:

Camera Focus / different AF methods

Post by Aegre Reminiscens » 11 Oct 2015, 16:03

Heyho,

I have two problems that I am unable to solve. I have two Canon IXUS100IS (with chdk), and a i5 computer with fedora, gnome, spreads, chdkptp ...the computer is fixed set up to be the machine for bookscanning.

1. The Cameras use different AF-methods. One uses "pattern", the other "center weighted average". When I started to debug this, both cameras had actually different methods set (in the stock firmware), so I changed this so that both now have "center weighted average". The pictures still come out as before the change...the menu says it is changed both to center weighted average, but the pictures still come out with different methods in the metadata

2. focus/autofocus in config.yaml
The default value is:

Code: Select all

    focus_distance: auto
I wanted to try manual mode but I can not find any documentation how to find out what value to set there. I have the problem that on half-empty pages the autofocus doesnt find anything and the image is blurred. I have read hints in old documentation of earlier spreads version that there are / have been / may be methods to work around this, but I have no clue where to look for them and how to configure them.
All my projects are documented here: http://www.ijon.me

duerig
Posts: 364
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: Camera Focus / different AF methods

Post by duerig » 11 Oct 2015, 22:24

You should be able to set the focus option in the new workflow or edit workflow forms. It sounds like you might be best served by the auto focus once option. It uses auto focus for the first picture then locks focus for all future photos. That way you won't have the problem with half pages being blurry.

The other way is to set a particular number which is a distance. One way to find the right focus is to change that by 10 or 20 at a time and take a number of photos. I have an idea that it would be good to do this automatically at some point and let the user pick the best fixed focus distance.

User avatar
Aegre Reminiscens
Posts: 33
Joined: 04 Mar 2014, 00:53
E-book readers owned: kindle
Number of books owned: 0
Country: Germany
Contact:

Re: Camera Focus / different AF methods

Post by Aegre Reminiscens » 12 Oct 2015, 07:48

duerig wrote:in the new workflow or edit workflow forms
Where do I find these forms? How can I access them?
All my projects are documented here: http://www.ijon.me

duerig
Posts: 364
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: Camera Focus / different AF methods

Post by duerig » 12 Oct 2015, 09:20

Oh. I had assumed you were using the Spreads web interface. If you are using the command line or gui, then you can edit config.yaml directly. The following parameters determine it:

focus_mode: autofocus_all

-- or --

focus_mode: autofocus_initial

-- or --

focus_mode: manual
focus_distance: 280

That should be in the camera configuration section with white balance, etc.

FYI, a lot of Spreads development over the past year or so has been about making things work well with the web interface and to make images that work on a Raspberry Pi. While I don't know specifically of any bugs in the gui or command line, I wouldn't be surprised if those have bitrotted at least to some extent. They are not exercised nearly as much as the web interface these days.

-D

User avatar
Aegre Reminiscens
Posts: 33
Joined: 04 Mar 2014, 00:53
E-book readers owned: kindle
Number of books owned: 0
Country: Germany
Contact:

Re: Camera Focus / different AF methods

Post by Aegre Reminiscens » 12 Oct 2015, 09:38

This should definitly be documented. If you would be so kind and tell me in which .rst-file on github this info belongs, I would happily put it there.
All my projects are documented here: http://www.ijon.me

duerig
Posts: 364
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: Camera Focus / different AF methods

Post by duerig » 12 Oct 2015, 11:07

I absolutely agree. I'm not the maintainer, but the repository is at:

https://github.com/DIYBookScanner/spreads

I'm sure that Johannes would like any pull requests you send that improve the documentation.

Here is the file in the /doc directory that you want to edit:

https://github.com/DIYBookScanner/sprea ... -other.rst

But I am not entirely sure how this documentation ends up on the readthedocs page or if it does. One of the things that needs fixed generally in Spreads is the documentation and the fact that there are multiple places where there is contradictory documentation is part of the problem.

-D

markvdb
Posts: 90
Joined: 28 Dec 2010, 18:45
Number of books owned: 0
Country: Belgium

Re: Camera Focus / different AF methods

Post by markvdb » 13 Oct 2015, 15:34

duerig wrote:But I am not entirely sure how this documentation ends up on the readthedocs page or if it does. One of the things that needs fixed generally in Spreads is the documentation and the fact that there are multiple places where there is contradictory documentation is part of the problem.
The documentation for the (very outdated) latest stable release is available at http://spreads.readthedocs.org/en/stable/. There are different ways to set this up, but basicly, this usually tracks tags in the git repo.

A commit to github should trigger an automated rebuild of the docs and make them available at:
http://spreads.readthedocs.org/en/latest

Mark
Mark
http://diybookscanner.eu - official EU diybookscanner kits - subscribe to our newsletter

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests