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.
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™!
# Install dependencies
pacman -S \
cmake gtk3 base-devel libxml2 portaudio libsndfile \
poppler-glib texlive-bin texlive-pictures gettext libzip lua53 lua53-lgi \
gtksourceview4 wget unzip git tmux
# Build openCV
./HACKING/build-opencv.sh
# Install dependencies
apt -y install \
make liblua5.3-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