Obsidian Scan Sketch
An open-source Obsidian plugin that turns a photo of a handwritten page into a clean scan inside your vault.
VIEW CODE ↗2025
Overview
Scan Sketch is a plugin for Obsidian, the note-taking app. I started it in December 2025 and I maintain it. It is listed in Obsidian's community plugins, works on desktop and mobile, and has over 1,000 downloads. You take or choose a photo, adjust the page corners, remove the background, tune the filters and save the result to a folder in your vault.
At a glance
- Status
- Open source, version 2.0.0, in the community plugin list
- My role
- Founder and maintainer
- Downloads
- Over 1,000, from the community plugin page
- Platforms
- Desktop and mobile, Obsidian 1.8.10 or newer
- Stack
- TypeScript, esbuild, Vitest
- Contributors
- Two, one of them added automatic page detection
From photo to scan
- Photo or camera
- Find the page corners
- Perspective crop
- Remove background
- Filters
- Save to the vault
What it shows
- Real perspective correction. The four corners you set are mapped onto a flat rectangle with the perspective-transform library. Each output pixel is traced back to its source pixel, and the coordinates are scaled for high-density screens.
- Background removal by colour. You click a background pixel and the plugin samples its colour. Every pixel within the chosen tolerance of that colour in RGB space becomes transparent.
- Automatic page detection, from a contributor. A contributor added detection of the page corners, merged as a pull request. It is written by hand in TypeScript without OpenCV: a paper-colour mask, blur, Sobel edges, hysteresis thresholds, contours, a convex hull and a four-corner approximation. It ignores shapes smaller than 30% of the photo.
- Works on a phone. A file input offers both the camera and the photo library on mobile, and the editor keeps the same controls on touch screens.
- Open to contributors. The same contributor also added JPG export that remembers your choice, an option to close the scanner after exporting, an option to insert the image link into the open note, and mobile fixes.
- Tested. Vitest runs against Obsidian mocks and covers the crop points, filters, background removal, page detection and export.
What I built
- Started the plugin and its scanner screen: a ribbon icon and a command that open the editor.
- The four-corner crop editor with manual dragging, and the perspective correction that flattens the page.
- Background removal: click the paper to pick its colour, then set how close a colour must be to disappear.
- Filters for brightness, contrast, saturation and black and white, and 90-degree rotation.
- Export as PNG, JPG or SVG into a vault folder, with settings for the folders and the default format.
- The Vitest test suite, the release builds, and the submission to the Obsidian community plugin list.
- Reviewing contributions and handling issues as the maintainer.
How it works
- You open the scanner from the ribbon icon or the command palette, then choose a photo or take one.
- The corners are found automatically or set by hand, and the page is flattened into a rectangle.
- You remove the background and apply filters while a preview updates.
- The image is saved as PNG, JPG or SVG into the vault folder you chose, and a link can be added to the note you are editing.
Dropping the custom camera
The first version had its own camera screen. Obsidian on macOS does not allow camera access, so I removed it and switched to a file input. On a phone it still offers the camera or the photo library.
Get it
Install
Obsidian > Settings > Community plugins > Browse > search "Scan Sketch"
https://community.obsidian.md/plugins/scan-sketch