02 december 2011
A textscanning workflow
For a project that involved dozens of print pages to be saved as textdocuments, I used the Tesseract OCR program together with the Netpbm library.
Here's what the three step workflow looks like.
From print to an OpenOffice textdocument in three steps:
Note that a little command-line proficiency is required here.
1) scan all documents
The printed text consisted of A4 pages as well as small (A5) booklets.
The A4 pages were scanned in full, booklets two pages at a time.
Scanner settings: 300 dpi, B/W (1 bit), saved as .tif files with a sequencenumber suffixed filename.
2) process the .tif files in batch with this shell script. Adjust it to your specific needs, e.g. the pixelsize of the scan images.
3) heavily relying on the spellchecker, use OpenOffice to cleanup the raw .txt and save the final text as .odt
Et voila!
Software used
Tesseract 3.00, Macports package
XDialog 2.3.1, idem
Tesseract trained data
Copied to /opt/local/share/tessdata
Dutch
English
Hindi
Sample text (dutch)
The scanned original: (textsnippet taken from this lecture)

Tesseract OCR result:

The final text after editing:

Geplaatst op 02 december 2011 22:20 | Comments (0)
02 november 2010
3D Scanner POC
Proof of concept, inspired by S. Baker's excellent simple 3D scanner article.
Hardware
- turntable (geared stepper)
- videocamera (keycam)
- laserpointer and glass rod
Software
- ImageMagick (ffmpeg etc.)
- c-scan
- scan-extract
- MakerScanner (cyclops?)
- Blender
- MeshLab
Workflow
- scan movie
- convert to individual frames
- derive point cloud with scan_extract
- create surface with Blender
- check mesh with MeshLab
- create g-code with Skeinforge
- final 3D Print result
Geplaatst op 02 november 2010 11:05 | Comments (0)
26 september 2010
Formulas in OpenOffice
Studying the Finite Element Method, I ran into a booklet with some math exercises. Just for the fun of finally using OOO formulas ;-), I created this OOO calc document for exercise 1.2.
"Exploratory Examples - for Real Analysis", by J.E. Snow and K.E. Weller, ISBN 0-88385-734-0, The Mathematical Association of America
Geplaatst op 26 september 2010 07:04 | Comments (0)
11 februari 2010
Finite Element Modeling
My first, modest, steps in modeling the heaterbarrel of my RepRap 3D Printer. Starting with a 2D model. Not taking into account real-life stuff such as convection, radiation and other effects (I am probably not even aware of :-)
First tried to get ElmerFEM to compile on Intel Mac to find out it crashed anyway. Then recently I found FreeFEM++ which is perfectly suited for this purpose.
Before I can add some more sensible comments to this post I have to re-read some old math and physics textbooks first. Partial differential equations, thermal diffusivitiy. All this may take some time ;-)
Todays' update; 3D image (FreeFEM3D icw medit) of the heaterbarrel and NiCr Heater coil model. Now reading my way through the "Finite Element Method" by Michael R.Gosz, ISBN 0-8493-3407-1. An excellent introduction on FEM.
Geplaatst op 11 februari 2010 18:59 | Comments (0)
01 juli 2009
Digital Storage Oscilloscope on iMac
For the few who consider using a USB Digital Storage Oscilloscope on Mac OS X. The Voltcraft (i.e. Hantek) model 2090 DSO can be used on the Mac in combination with Oleg Khudyakov's HantekDSO (Linux) software.
Having KDE installed anyway, here is an example of what KDE looks like on the iMac.
Syscompdesign has a simple DSO and OSS software that works on OS X. The 2MHz bandwith I consider too low for my use though.
In search for other suitable DSO's I found none other. What I did find was the HantekDSO package from Oleg K. This opens up the Hantek (Voltcraft and the like) DSO for use under Linux. In short, I managed to compile HantekDSO under OS X (10.5.7) and tested it with the Hantek 2090 (40Mhz) model.
2012-05-02 Update: installation details for HantekDSO 0.5.4 on OS X 10.6.8$ sudo port install kde ## dependency (would kdelibs3 and kdeutils3 suffice?)
$ sudo port install binutils ## due to libbfd dependency$ sudo tar xvfz HantekDSO-0.5.4.tar.gz
$ cd HantekDSO
$ sudo ./configure \
--prefix=/opt/local/HantekDSO \
--include=/opt/local/include/ \
--with-extra-libs=/opt/local/lib/x86_64 \ ## my libiberty location
--with-qt-includes=/opt/local/include/ \
--with-qt-libraries=/opt/local/lib/ \
--without-arts
...
Warning: you chose to install this package in /opt/local/HantekDSO,
but KDE was found in /opt/local.
For this to work, you will need to tell KDE about the new prefix, by ensuring
that KDEDIRS contains it, e.g. export KDEDIRS=/opt/local/HantekDSO:/opt/local
Then restart KDE.
Good - your configure finished. Start make now## -I/opt/local/include added to DEFAULT_INCLUDES in dsoextractfw/Makefile.in ## http://avahi.org/ticket/194
## -I/opt/local/include added to DEFAULT_INCLUDES in dsoextractfw/Makefile.in
## dsoextractfw_LDADD = -lbfd -liberty -lintl added to dsoextractfw/Makefile.in
## include <malloc.h> commented out and added
#include <stdlib.h> in dsoextractfw/dsoextractfw.c ## http://developer.apple.com/technotes/tn2002/tn2071.html$ sudo make
$ sudo make installTest in X11 terminal:
$ cd /opt/local/HantekDSO/bin
$ ./hantekdso
=> OkOptionally generate documentation using (MacPorts) Doxygen:
$ cd /opt/local/HantekDSO/HantekDSO
$ sudo doxygen -g ## generate template configuration file (in Doxyfile)
$ sudo vi Doxyfile
## set projectname and doc options:
EXTRACT_ALL=YES
EXTRACT_PRIVATE=YES
RECURSIVE=YES
INLINE_SOURCES=YES$ sudo doxygen ## generate documentation (in ./html)
=> Open ./html/index.html in SafariExtract firmware from the Voltcraft Driver CD:
$ cd /opt/local/HantekDSO/bin
$ sudo cp /Volumes/DSO-2090\ USB/Driver/DSO20901.sys .
$ sudo cp /Volumes/DSO-2090\ USB/Driver/DSO20902.sys .
$ sudo mv DSO20901.sys DSO20901.SYS ## want extractfw zoekt met uppercase extensie
$ sudo mv DSO20902.sys DSO20902.SYS
$ sudo ./dsoextractfw
...Load firmware using fxload-osx (built with xcode):
$ ./fxload-osx -t fx2 -I DSO2090_firmware.hex -s DSO2090_loader.hex -D 04b4:2090
And, finally, run HantekDSO:
$ ./hantekdsoYou can create a shell- or Applescript to load the FW and start HantekDSO.
Geplaatst op 01 juli 2009 18:11 | Comments (0)
23 maart 2009
Dem bones (not the song)
Yeah, just when things got interesting I broke my collarbone. Being an allweather biker for over twenty years I reckoned something like this could happen someday. That day was yesterday. The pain is bearable, there's enough things to do to do BUT any tinkering. Which will not be possible the coming weeks...
Status 9 april, btw that is is a comminuted fracture. Then again, an opportunity to get to know Dicom better. The (Open?) Digital Imaging standard used at the local hospital. With Osirix, an open source Dicom viewer, you can view your X-ray images on your Mac too ;-)
Geplaatst op 23 maart 2009 23:11 | Comments (3)
07 februari 2009
QCad 2.0.5 on Intel Mac OS X
Looking for a program to view and edit .dxf files on the Mac I stumbled upon QCad from Ribbonsoft. This allows you to view and edit Autocad DXF files.
Compiling QCad
Although the QCad source is under GPL, only demo versions are availabale as binary. So, compiled QCad from source. Follows the list and some links I used to get QCad compiled under OS X 10.4.11 with gcc-4.0 (and using a MacPorts QT3 installation, present from previous MacPort installed sw)
### install the QT3 package with MacPorts.
### You are expected to be familiar with MacPorts
### and have it installed
$ ssh -l yourAdminUser localhost
## this is used to logon as admin from within an
## ordinary user terminal session
$ sudo port selfupdate
$ sudo port install qt3
...
### compile QCad
$ cd /opt/local
$ sudo mkdir qcad
$ sudo cp /Users/yourUserId/Desktop/QCad/qcad-2.0.5.0-1-community.src.tar.gz .
$ tar xfz qcad-2.0.5.0-1-community.src.tar.gz
$ rm qcad-2.0.5.0-1-community.src.tar.gz
### to prevent "qmacstyle_mac.h: No such file or directory" error,
### applied patch manually (as patch raised errors) by commenting
### out (with vi) in src/main.cpp:
//#ifdef __APPLE__
//#include
//#endif:
...
//#ifdef __APPLE__
// QApplication::setStyle(new QMacStyle());
//#endif
...
$ export QTDIR=/opt/local/lib/qt3 ## MacPorts QT3 location
$ export QMAKESPEC=/opt/local/lib/qt3/mkspecs/macx-g++
$ cd scripts
$ ./build_qcad.sh notrans
Running QCad
Doubleclik QCad.app or start from terminal window:
$ open /opt/local/qcad/qcad-2.0.5.0-1-community.src/qcad/QCad.app
Compile QCad under OS X 10.5.8
$ cd /opt/local/qcad/qcad-2.0.5.0-1-community.src/scripts/
$ sudo vi build_qcad.sh # set Qt vars in build script (setting environment vars didn't work for me)
export QTDIR=/opt/local/lib/qt3
export QMAKESPEC="/opt/local/lib/qt3/mkspecs/macx-g++"
export PATH=$QTDIR/bin:$PATH$ sudo vi ../qcadlib/src/engine/rs_entity.cpp # edit or apply this Debian patch
- os << " layer address: " << (int)(e.layer) << " ";
+ os << " layer address: " << (long)(e.layer) << " ";$ sudo vi ../qcadlib/src/engine/rs_layer.cpp # same
- << " address: " << (int)(&l)
+ << " address: " << (long)(&l)$ sudo vi ../qcad/src/qc_applicationwindow.cpp # fix Help info (Qt assistant is in /opt/local/bin/qt3 which is part of the $PATH set)
- assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this);
+ assistant = new QAssistantClient("", this);$ sudo rm ../dxflib/src/*.o; # clean .app and all object files
$ sudo rm ../fparser/src/*.o;
$ sudo rm ../qcad/src/obj/*.o;
$ sudo rm ../qcadactions/src/obj/*.o;
$ sudo rm ../qcadcmd/src/obj/*.o;
$ sudo rm ../qcadguiqt/src/obj/*.o;
$ sudo rm ../qcadlib/src/obj/*.o;
$ sudo rm -R ../qcad/QCad.app;$ sudo ./build_qcad.sh notrans # build QCad
Geplaatst op 07 februari 2009 17:28 | Comments (1)
28 december 2008
Organizer drawer
Waiting for the RepRap Cartesian parts being delivered, completed today my first 3D object, an organizer drawer :-).
The Blender crash course, that is tutorials, found at rab3d.com, starting with the 608 Bearing tutorial was very helpful.
Geplaatst op 28 december 2008 17:46
14 mei 2006
MyPeoplebook adressenlijst
Een eenvoudige adressenlijst voor het Joomla [voorheen Mambo] content management pakket. Bedoeld voor diegene die snel een eigen maatwerk oplossing zoekt voor een filiaal-, leveranciers- of wat-dan-ook voor adressenlijst.
Dit is een eerste beta-versie die interessant kan zijn voor een beginnend Mambo of Joomla PHP ontwikkelaar.
Gebaseerd op de Peoplebook v1.1.2 component van N. Moyroud. Aangevuld met rubrieken voor NAW, aanhef, titel en specialisme. Gegevens kunnen nu ook in de front-end gewijzigd worden.
- Getest met Mambo v4.5.2 (Met name de lijst- en kaartenlijstweergave zijn getest. Andere functionaliteit, zoals het toevoegen van afbeeldingen, is niet getest)
- GPL Licensie
Download MyPeoplebook (52 KB)
Geplaatst op 14 mei 2006 02:10
02 januari 2006
Teksteditor Yudit
To edit my Hindi words list, I use open-source texteditor Yudit. Though a plain, Spartan, interface, it does the job of typing Devanagari text.
As with most ported stuff, Yudit was installed using MacPorts.
2011 Update
Compile Yudit from source. Source download from www.yudit.org
$ cd /opt/local # use Macports' location
$ cp -R your_src_location/yudit-2.9.2 .
$ ./configure prefix=/opt/local/yudit-2.9.2
$ make
$ make install
$ cd bin
$ ./yudit # check
Geplaatst op 02 januari 2006 12:21
01 januari 2006
Boekhouden met GnuCash
Voor een eenvoudige (ZZP) administratie is GnuCash een aardig Open Source boekhoudpakket.
Bijhouden van Kosten, Opbrengsten, Kredieten, Leningen etc. Ook belastingtabellen voor in- en verkoop facturen. Geeft op elk moment een overzicht van je financiële situatie.
Weliswaar niet te vergelijken met producten als Exact software maar aanzienlijk beter dan prutsen met Excel sheets!
Voordelen:
- geen aankoopkosten
- veel overzichten
- open source
- Linux, Windows, Mac
- rapporten uit te breiden (vereist wel kennis van programmeren)
- facturering en debiteuren geschikt voor kleine onderneming
- (beperkte) faciliteit voor het importeren van online bankieren
- bijhouden van aandelenportefeuille
- ophalen van on-line aandelenkoersen
Nadelen:
- interface is wat stug (maar dat went in gebruik)
- importeren van banktransacties is beperkt
- geen koppeling met kassa systeem
- de Macports en Fink versies voor Mac zijn niet eenvoudig te installeren (inmiddels is er een .dmg versie voor PPC Macs)
Een voorbeeld rekeningschema:
Download het GnuCash Rekeningschema (.xml 71KB). In GnuCash openen met menu Bestand - Openen.
Voor het aanpassen van het GnuCash GUI thema kan GTK Theme worden gebruikt. Voor Mac is er een Macports package.
Geplaatst op 01 januari 2006 12:14 | Comments (0)
01 januari 2005
DTP with Scribus
For simple Desk Top Publishing jobs you can use Scribus. The (Dutch) OS X Shortcuts reference was created with Scribus version 1.3.
Geplaatst op 01 januari 2005 11:03 | Comments (0)
