Comments (9)
@artyom https://github.com/artyom/smartcrop created a fork without OpenCV dependency!
from imaginary.
From imaginary
v1.0.8+, there is first-class support for smart cropping relying on the built-in cropping algorithm in libvips
. There is no plans to support face detection in imaginary
.
For more details, see the documentation:
https://github.com/h2non/imaginary#get--post-smartcrop
from imaginary.
Thank you! I have also in mind introduce support for smart crop, mostly following this implementation.
At this time, you can perform the smart crop calculus using another solution, and then extract the image area using imaginary
.
from imaginary.
I believe the technical term to be Seam Carving or Liquid Rescaling. Just mentioning it here in case people search the issues for it.
I think it would be a great feature to have! But I'm curious, what should happen when no "interesting" center is determined?
from imaginary.
There is a Go version of smartcrop
that seems fairly trivial to add to Imaginary https://github.com/muesli/smartcrop
What is your roadmap on the "smart crop" endeavor @h2non ?
from imaginary.
The unique bad part I see here is that it depends on OpenCV. I'm not too much open in adding another C dependency which mostly provides the same as libvips
.
Some intermediate solutions could be:
- Port the smartcrop from
OpenCV
tolibvips
. Implies considerable non-trivial work. - Provide a programatic way, such a middleware/plugin layer, to easily extend behavior related to image processing, adding pre/post processors, extending the standard process pipeline currently done in
bimg
.
from imaginary.
So either option requires quite a bit of non-trivial work. What is the strongest argument against linking OpenCV?
from imaginary.
As of libvips version 8.5.0, there is a "smart crop" feature available. It's based on Sharp's smartcrop, which I think is the same as linked earlier here in the Issue.
See also:
- https://github.com/jcupitt/libvips/blob/c79f64ab7def94b23ca65abf46c4ca9e97e3c5db/libvips/conversion/smartcrop.c
- h2non/bimg#48
from imaginary.
I've made a PR to implement bimg's smartcrop API. It's obviously not face-detection, but perhaps it's enough for your use-case @cicerocomp ?
from imaginary.
Related Issues (20)
- Don't you support gif resizing? HOT 1
- Docker tag `latest` was last updated 2 years ago HOT 14
- [Feature] Provide image-tile-support HOT 1
- How to generate a fixed size thumbnail without cropping or distorting? HOT 2
- embed error when using pipeline with resize + watermark on small image HOT 1
- embed parameter is missing from list of allowed parameters
- stripmeta=true results in wrong colors for non-sRGB JPEGs
- Does Imaginary Docker support arm? Not compatible with Raspberry Pi 4 HOT 3
- Where can I find the log files?
- Error with throttled package HOT 4
- Resize PNG without antialiasing HOT 3
- How to debug error 400 ? HOT 3
- Is there any option to crop at position?
- Integrate pull request preview environments
- Imaginary preview generation failed: HOT 1
- What causes the "Image Resolution is too Big" Error? HOT 1
- New release HOT 7
- Is there a way to deskew an image?
- Passing Last-Modified or etag in response header
- 1 Is there any method to copy from savePath to "collect_${savePath}"? ; 2 Check whether there is a method to clear the vicinity by a specific directory or by a time range.
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 imaginary.