If you're anything like me, you're a huge nerd engineering major who enjoys
working out problems both on whiteboards and digitally. You might also
have six million photos of your whiteboard work trapped on your phone
or in your Google Drive with no good way to easily group them in with
your other notes.
Inkpath is a project designed to crunch those whiteboard photos into easily editable Xournal++ note files so that you can drop your whiteboard scrawlings directly into your lecture notes. Convenient!
The project consists of a lua script and a shared object library written in C++ statically linked with some OpenCV utils. The project now uses OpenCV in place of Autotrace to perform an Otsu Threshold. The thresholded image is then inverted, and skeletonized, producing the centerline of each individual object in the image (which at this point should be just markings). The resulting image is then scanned for contours. These contours are pushed onto the lua stack, and passed to the Xournal++ API. Unlike the previous implementation, this operates purely on rasters.
Requires Xournalpp >=1.2.0
Inkpath is packaged as a statically-linked .so
file coupled with a Lua script,
so you should be able to download the release from the releases page
and have it Just Work™.
As of 2022-09-24, the API changes in Xournalpp are merged, but have not made it into the package managers. You will probably need to build xournalpp from source in order to get them.
Inkpath is coming to a package manager near you soon™!
-
Download the latest release of ImageTranscription-win.zip
-
Unzip the archive and copy ImageTranscription/ to the plugin path:
C:\Program Files\Xournal++\share\xournalpp\plugins\ImageTranscription
-
Run install.ps1 to update the user Path
-
Run Xournal++ and enjoy
-
Delete
C:\Program Files\Xournal++\share\xournalpp\plugins\ImageTranscription
-
Remove environment variable
- Type
Win+R
and typesysdm.cpl
- Go to Advanced > Enviornment Variables > Path > Edit
- Delete ImageTranscription entry
- Press OK until all dialogs are closed
mkdir build
cd build
cmake ..
make
# Install dependencies
pacman -S \
cmake gtk3 base-devel libxml2 portaudio libsndfile \
poppler-glib texlive-bin texlive-pictures gettext libzip lua54 lua54-lgi \
gtksourceview4 wget unzip git tmux
# Build openCV
./HACKING/build-opencv.sh
# Install dependencies
apt -y install \
make liblua5.4-dev build-essential pkg-config libglib2.0-dev libpng-dev \
cmake libgtk-3-dev libpoppler-glib-dev portaudio19-dev libsndfile-dev \
dvipng texlive libxml2-dev libzip-dev librsvg2-dev gettext lua-lgi \
libgtksourceview-4-dev git gdb x11-apps wget unzip
./HACKING/build-opencv.sh $NUMBER_OF_CORES_YOU_HAVE # You'll need sudo to install this
./HACKING/build-xopp.sh $NUMBER_OF_CORES_YOU_HAVE # You'll probably need sudo to install this too
make install
-
Install MSYS2
-
Open MSYS2 MINGW64 shell
-
Install dependencies
pacman -S \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gtk3 base-devel libxml2 mingw-w64-x86_64-portaudio mingw-w64-x86_64-libsndfile mingw-w64-x86_64-poppler mingw-w64-x86_64-libzip mingw-w64-x86_64-lua53 mingw-w64-x86_64-lua53-lgi mingw-w64-x86_64-gtksourceview4 mingw-w64-x86_64-opencv wget unzip git tmux
- Launch MSYS2 MINGW64 shell as Administrator, and use
cmake
to build and run post-build script to gather dependencies and assemble the plugin
mkdir build
cd build
cmake .. # Use ${MINGW_PREFIX}/bin/cmake if normal cmake doesn't work
mingw32-make.exe install
-
Run scripts/win_configure_path.ps1 to update the user Path
-
Run Xournal++ and enjoy