Git Product home page Git Product logo

Comments (3)

Hudsone avatar Hudsone commented on July 4, 2024

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.

jos-eph avatar jos-eph commented on July 4, 2024

@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.

Hudsone avatar Hudsone commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.