Comments (3)
By the way, after some researches, I found that the original auto cropping algorithm uses standard deviations to detect the region border.
It's useful to remove noises for the scanned documents. However, it also easily gets incorrect result for well outputted documents.
I tried to implement a way to use absolute thresholds to detect the borders and it works well for my condition. Relative easy. If anyone also needs this function, maybe we can create a pull request for it. 👍
from briss-2.0.
@Hudsone I have implemented this feature to do PDF crops via the command line in a fork, https://github.com/jos-eph/Briss-2.0-command-line-crop . My first attempt at open source contribution. The readme isn't updated, but you can see the operation from the source. A command like
java -jar ./build/libs/briss-command-crop.jar -s /Users/me/Downloads/cropthis.pdf -d $HOME/Desktop/testcrop.pdf --odd-rects 147.0,154.0,460.0,643.0 --even-rects 148.0,301.0,458.0,643.0
. You can also use the --rects
option if the cropping for odds and evens is identical. If you want to leave some pages out, use the --exclude-pages
option with a comma-separated list of page numbers (e.g., 4,5,10
). Ranges are currently not supported for the CLI.
If you run a Crop
or a Preview
from the GUI, it will output the command-line options that you can use to replicate the crop to the console.
Note that Briss supports cropping multiple regions on a single page, but the feature I wrote simplifies this down to one big region per page. There's also no option for rects for the exclude-pages
.
cc: @cleydyr , @mbaeuerle
from briss-2.0.
Oops, cool. It would be quite useful! I think a single region should be enough for most cases lol.
from briss-2.0.
Related Issues (20)
- New crop rectangles are created behind older ones HOT 3
- V2-alpha 3 exceptions in Command prompt HOT 6
- Image to big HOT 3
- Running on MacOS HOT 15
- Problems Launching on Briss 2.0 HOT 12
- Add Java 19 support HOT 3
- Can I pass the --splitcol argument without executing it?
- Can't get Briss 2.0 to run without freezing HOT 1
- [feature request] page overlap mark HOT 1
- [feature request] add ability to lock aspect ratio HOT 1
- How to install it? HOT 14
- Can't execute Briss 2.0 on Windows 11 HOT 8
- Store application state as user configuration
- Application window may appear outside of the visible screen on scaled up screens
- Different cropped page widths from identically sized crop boxes HOT 5
- Destructive crop for conversion to epub HOT 1
- Missing shortcuts HOT 2
- Classpath location incorrect after build HOT 2
- Crash on launch - macOS HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from briss-2.0.