An open API service indexing awesome lists of open source software.

https://github.com/farzonl/seamcarving

A CLI tool that grows or shrinks images using a graph cut algorithm.
https://github.com/farzonl/seamcarving

computer-photography computer-vision opencv

Last synced: 11 months ago
JSON representation

A CLI tool that grows or shrinks images using a graph cut algorithm.

Awesome Lists containing this project

README

          

# Seam Carving

## Code status
[![codecov](https://codecov.io/gh/farzonl/SeamCarving/branch/master/graph/badge.svg)](https://codecov.io/gh/farzonl/SeamCarving)
[![Build Status](https://travis-ci.com/farzonl/SeamCarving.svg?branch=master)](https://travis-ci.com/farzonl/SeamCarving)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/farzonl/SeamCarving.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/farzonl/SeamCarving/alerts/)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/farzonl/SeamCarving.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/farzonl/SeamCarving/context:cpp)

## Demo
[![Fluid Simulation](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/Result.png)](https://youtu.be/Curd1u6-itE)

## Dependencies
- opencv
### For Mac
```
brew install opencv
```
### For Linux
- pkg-config (also needed)
```
sudo apt-get install libopencv-dev pkg-config
```
### For Windows
- VS was never tested.
- As a work around you can install the linux subsystem for windows and Xmig for X11 windows
run the linux steps.

## how to build?
```
make
```
## how to run?
- basic usage horizontal shrinking with fixed number of seams:
```
./exec .png|jpg
```
- vertical or horizontal shrinking with fixed number of seams:
```
./exec .png -h|-v
```
- vertical or horizontal shrinking with variable number of seams:
```
./exec .png -h|-v -n
```
-Toggle shrink or grow usage.
```
./exec .png -h|-v -r|-g -n
```

## Code Description
![](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/codeDesc.png)

## High Level Pipeline
![](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/pipeline.png)

## Grow Pipeline
![](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/growingpipeline.png)

## Shrink Pipeline
![](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/shrinkingpipeline.png)

## Class Presentation
![presentation](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/presentation.pdf)

## Final Report
![report](https://raw.githubusercontent.com/farzonl/SeamCarving/master/documentation/report.pdf)