Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • raj 10:38 pm on June 24, 2014 Permalink | Reply
    Tags: , nikon   

    Using the Nikon J3 with gphoto and ubuntu 

    Some notes on using the Nikon J3 for remote capture:

    • We added Nikon J3 support to gphoto, for use with IA tabletop bookscanners. Most these changes came in r149415. Version r14922 has been tested with this camera on both Ubuntu 12.04 and Ubuntu 14.04.
    • A git-svn mirror of photo (at r14922) is available here: https://github.com/rajbot/gphoto
    • Ubuntu tries to mount the camera as a filesystem using `GVFS` as soon as the camera is connected via USB. On older versions of Ubuntu, a gvfs-gphoto bug causes the camera to lock up. The easiest way to disable automounting of the camera is to `chmod -x` the gvfs-gphoto2-volume-monitor:
      sudo chmod -x /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

    Update: Nikon 1 support has now been integrated into gPhoto 2.5.5!

     
  • raj 7:46 pm on June 18, 2014 Permalink | Reply
    Tags: littefreelibrary   

    Leawood [Kansas] man faces citation for putting Little Free Library in his front yard

     
  • raj 4:33 am on June 10, 2014 Permalink | Reply
    Tags:   

    Some questions when considering a camera for remote capture 

    • Does the camera support a standard for remote capture, such as PTP?
    • Does gphoto already support this camera? If not, is there an existing SDK for linux? If not, is there existing remote capture software on any platform that works with this camera?
    • Can you capture and download an image without a memory card installed in the camera?
    • How fast can you capture and download an image?
    • Is there an API for enabling/disabling autofocus?
    • Is there a mechanical mirror? If so, can you lock it in position?
    • Is the shutter electronic or manual? (Are both first and second curtain electronic?)
    • How many shots can you take before the camera needs repair?
    • Does the remote capture API work over USB? or only wifi? How many cameras can we connect to the same computer?

    There are lots of questions about image quality to consider as well. Also, we are not concerned about video, but it would be worth knowing what video operations are supported via API.

     
  • raj 10:02 pm on May 2, 2014 Permalink | Reply
    Tags:   

    Compiling gphoto on Ubuntu 14.04 LTS 

    Here are instructions on how to compile a minimal gphoto build into /usr/local on a fresh Ubuntu 14.04 Trusty desktop install:

    # install dependencies and checkout gphoto source
    $ sudo apt-get install automake autopoint gettext libtool libusb-dev libpopt-dev subversion
    $ svn checkout svn://svn.code.sf.net/p/gphoto/code/trunk gphoto
     
    # compile libphoto2 and install into /usr/local/lib
    $ cd gphoto/libgphoto2/
    $ autoreconf --install --symlink
    $ ./configure
    $ make
    $ sudo make install
     
    # compile gphoto2 and install into /usr/local/bin
    $ cd ../gphoto2
    $ autoreconf --install --symlink
    $ ./configure
    $ make
    $ sudo make install

    In order to run ghoto with the version of libgphoto2 that you just built (as opposed to the one that came with Ubuntu 14.04), be sure to set LD_LIBRARY_PATH:

    $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/gphoto2 --version
    gphoto2 2.5.4
     
    Copyright (c) 2000-2014 Lutz Mueller and others
     
    gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
    redistribute copies of gphoto2 under the terms of the GNU General Public
    License. For more information about these matters, see the files named COPYING.
     
    This version of gphoto2 is using the following software versions and options:
    gphoto2         2.5.4          gcc, popt(m), no exif, no cdk, no aa, no jpeg, no readline
    libgphoto2      2.5.4.1        all camlibs, gcc, ltdl, no EXIF
    libgphoto2_port 0.10.0         gcc, ltdl, USB, serial without locking
     
  • raj 7:23 pm on March 5, 2014 Permalink | Reply
    Tags: PyInstaller, PyQt,   

    Loading DLLs from a PyInstaller-packaged PyQt standalone application 

    I wanted to package a PyQt script as a standalone Windows .exe using PyInstaller, and I wanted the app to display a jpeg.

    It turned out that displaying a PNG was fine, but displaying a JPEG took a while to get working. PyQt uses a dll called `qjpeg4.dll` for decoding the jpeg, and PyInstaller doesn’t automatically bundle it into the package, so we have to tell PyInstaller to do so.

    There is still one problem though: when you run the .exe, where does PyQt try to load `qjpeg4.dll` from? It turns out that *it depends*..

    If you use the `–onedir` option for PyInstaller, the `imageformats/qjpeg4.dll` just needs to be in a directory called `imageformats`. No problem.

    If you use the `–onefile` option, PyInstaller unzips the binaries into a temp directory, and loads dlls from there. But for some reason, in the `–onefile` case, PyQt tries to load the dll from `qt4_plugins/imageformats/qjpeg4.dll`.

    I used SysInternals Process Monitor to figure this out…

    To make things easy, I just added an `imageformats` directory to my repo, and checked in the qjpeg4.dll.

    I also wanted to load a dll called `discid.dll`, required by python-discid. I checked into the root level of the repo, but couldn’t get the python package to load the dll properly, until I modified the PATH environment variable:

    #fix for loading discid.dll
    if getattr(sys, 'frozen', None):
         BASE_DIR = sys._MEIPASS
    else:
         BASE_DIR = os.path.dirname(__file__)
    os.environ['PATH'] = BASE_DIR + '\;' + os.environ.get('PATH', '')
    import discid

    My PyInstaller .spec file for the `–onefile` case looks like this:

    # -*- mode: python -*-
    a = Analysis(['wizard.py'],
                 pathex=['y:\\archivecd'],
                 hiddenimports=[],
                 hookspath=None,
                 runtime_hooks=None)
     
    onefile_binaries = a.binaries + [('discid.dll', 'discid.dll', 'BINARY'),
                             ('qt4_plugins/imageformats/qjpeg4.dll', 'imageformats/qjpeg4.dll', 'BINARY'),
                            ]
    pyz = PYZ(a.pure)
    exe = EXE(pyz,
              a.scripts,
              Tree('images', prefix='images'),
              onefile_binaries,
              a.zipfiles,
              a.datas,
              name='wizard.exe',
              debug=False,
              strip=None,
              upx=True,
              console=True )
     
  • raj 11:46 pm on February 12, 2014 Permalink | Reply
    Tags:   

    Thinking about the Wayback Machine 

    wayback boxes and arrows

     
  • raj 11:58 pm on February 7, 2014 Permalink | Reply
    Tags:   

    BookReader usage in 2013 

    We measured whenever someone opened the IA BookReader. Usage more than doubled in 2013, to more than 5 people opening up the BookReader every second!

    bookreader_graphite.us.archive.org

    For 2014, we won’t be able to produce the same data, since we now embed the BookReader on archive.org details pages, and a pageview now registers as a “bookreader open” event, even if the user doesn’t actually read the book.

     
  • raj 7:16 pm on October 31, 2013 Permalink | Reply
    Tags: , wordpress   

    BookReader embeds on wordpress.com 

    Blogs hosted at wordpress.com can now use BookReader embeds!

    http://en.support.wordpress.com/embedding-ebooks/

     
  • raj 6:46 pm on October 14, 2013 Permalink | Reply
    Tags: , iceland   

    Iceland: Where one in 10 people will publish a book – http://www.bbc.co.uk/news/magazine-24399599

     
  • raj 6:24 pm on September 5, 2013 Permalink | Reply
    Tags: dvd,   

    A robot for digitizing DVDs: http://www.britishideas.com/2013/09/03/jack-the-ripper-bot-i-introduction/

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel