ArtScan

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

ArtScan

Postby qwer » 20 Oct 2009, 07:23

About 3 month ago started project of scriptable scans processor http://code.google.com/p/artscan/ , written in Python/PyQt4.
Image
Filters/transformations easily added through plugins (example - rotation plugin http://code.google.com/p/artscan/source ... tion_qt.py ).

To download sources you need Mercurial: http://mercurial.selenic.com/wiki/Downl ... ryPackages , download command : hg clone https://artscan.googlecode.com/hg/ artscan

To run you need Python (tested with version 2.5): http://www.python.org/download/releases/2.5.4/
PyQt4 for Python 2.5 : http://www.riverbankcomputing.co.uk/sof ... t/download
additional packages : Babel : http://babel.edgewall.org/wiki/Download

Every plugin is descendant class of Plugin.
In constructor __init__ first filled plugin description fields (shown to the user in plugins tree and parameters editor), and added plugin parameters descriptors (first added 3 standard parameters for document/page/layer selection, and additional - rotational angle, rotational quality. Each parameter has short tag (by which you get access to parameter value), full localized name and description name,descr (displayed to user), default value (val_def), by it's type determined parameter type (int/float/string/bool), additinal parameter options (minimum, maximum, step etc), vals - list of possible values.
Actual plugin processing in done in method 'execute'. It receives values of entered parameters when user click on 'Apply' button in parameters editor.
Method self.getLayersSelection of Plugin object returns list of selected documents/pages/layers objects based on values of parameters 'documents', 'pages', 'layers'.
All selected layers objects processed in loop: for layer in self.getLayersSelection(params):.
First, image of layer readed : image = layer.getImage(), then done transformation of image : image.transformed (look in Qt/PyQt QImage documentation on possible tranformations). Then new image saved for current processed layer instead of old, and page view refreshed (layer.setImage(image, rebuildView=True)).

Currently developing/testing/planned : backround plugins execution, undo for layers/zones operations, rectangular/polygonal zones creation/editing, plugins for effects/transformations (using Qt, PIL, or PythonMagick - ImageMagick binding) / djvu,pdf import/export (split Djvu layers editing possible) / scanning (through sane/twain, with control of automatic scanners) / OCR integration (ocropus,cuneiform or other engines) and text layer editor.
Selective pages/layers/zones processing is possible by adding attributes for that objects ('Attributes' parameter in document/page/layer/zone properties editors tabs above pages list).
Also possible immediate scripts execution (in script editor on plugins panel). Executed script commands shown in log text area (bottom of plugins panel), user can copy them to script editor, and make own script by combining many processing commands.

Class hierarchy:

Code: Select all

ArtScanApplication - main application
  ArtScanMainWindow - main window
    Documents - container of opened documents and tab widget
      Document - document, container of document pages and page view area
        Page - represents document page with multiple image layers
          Layer - represents page layer
            Zone - selected zone on layer
    Plugins - container of loaded plugins
      PluginsGroup - group of plugins in plugins tree
      Plugin - plugin

User avatar
daniel_reetz
Posts: 2753
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: ArtScan

Postby daniel_reetz » 20 Oct 2009, 08:18

Hey Qwer, nice work! And thanks for the technical introduction.

Is ArtScan primarily set up for the output of flatbed scanners, or does it accommodate camera scans?

User avatar
daniel_reetz
Posts: 2753
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: ArtScan

Postby daniel_reetz » 20 Oct 2009, 08:19

I see in the right hand panel there is an "OCR" selection. Is that implemented, or just a placeholder?

qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

Re: ArtScan

Postby qwer » 20 Oct 2009, 08:38

Is ArtScan primarily set up for the output of flatbed scanners, or does it accommodate camera scans?
no difference, it depends only on developed transformation/filtration plugins and their combination.
I see in the right hand panel there is an "OCR" selection. Is that implemented, or just a placeholder?

Placeholder, I plan to use ocropus/cuneiform.

qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

Re: ArtScan

Postby qwer » 25 Oct 2009, 04:43

Update:
- added parameters validation (marks wrong parameters by red color),
- added couple of plugins using Imagemagick (rotate, despeckle, sharpen), works good but slow, PNG format much slower, use TIFF instead - its faster and preserves original compression. Strange but despeckle gives very weak results, and has no execution parameters to tune it up.
Image

qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

Re: ArtScan

Postby qwer » 25 Oct 2009, 11:26

For testing purposes added GraphicsMagick command-line contrast enhancement plugin. Seems to process images much faster than ImageMagick (IM loads image up to 10 seconds).
http://code.google.com/p/artscan/source ... rast_gm.py
Image

qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

Re: ArtScan

Postby qwer » 18 Nov 2009, 14:33

Completed basic zones operations:
Image

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: ArtScan

Postby rob » 21 Nov 2009, 18:55

Wow, it's looking very nice!

I hope you can find some kind of page uncurling library :/
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

qwer
Posts: 11
Joined: 04 Mar 2014, 00:52

Re: ArtScan

Postby qwer » 22 Nov 2009, 10:52

I hope you can find some kind of page uncurling library
I doubt, perhaps I'll have to write it myself.
BTW have you received satisfactory results with your algorithm ?

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: ArtScan

Postby rob » 23 Nov 2009, 11:09

Only for mildly curled pages. For severely curled pages, the algorithm results in a page full of fail :(
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.


Return to “Programs, Software releases, and more.”

Who is online

Users browsing this forum: No registered users and 1 guest