Giter Club home page Giter Club logo

seam-carver's Introduction

seam-carver

Work in progress!

OpenCV4 based utility for efficient multi-threaded content-aware scaling. Includes a basic wrapper for user control but the main focus is on the underlying Carver class which is used for the actual image processing. Feel free to add any GUI bindings or an advanced CLI for easy usage.

Basic usage:

carver -m <mode> -o <output_path> <input_path>

How does it work?

Wikipedia includes a decent explanation on the topic. The basic idea is to pick a method to assign an importance value to each pixel and then locate the least important seams through the image. This solution uses gradient magnitude (energy) as the importance value. Energies are updated each time a seam has been cut from the image to achieve best possible quality.

Asynchronous C++ processing and threading is used for performance gains. The effect of these really comes to shine when carving larger images in both directions.

Processing reasonably sized images is quite swift but bear in mind that the actual complexity of this algorithm by image width and height is in the range of O(W ร— H + W + H).

How to get it?

cmake is the recommended workflow for building this project. The premade cmake definitions include diretives for building both a standalone app as well as a static library.

If you do not feel like building, some premade binaries will be attached to releases. Dynamic OpenCV dependencies are:

libopencv_imgcodecs.so.4.3
libopencv_imgproc.so.4.3
libopencv_core.so.4.3

Example output when running in vertical mode

image image

seam-carver's People

Contributors

jjstoo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.