Giter Site home page Giter Site logo

gabrielkunz / seam-carving Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 2.0 72.01 MB

Content-Aware Scaling using Seam Carving method with different algorithms for energy mapping

License: MIT License

Python 100.00%
seam-carving content-aware-scaling resize content-aware-resize image-processing sift shannon-entropy energy-mapping feature-matching

seam-carving's Introduction

Linkedin Badge SAP Community Badge Lattes Badge

Computer Engineer currently working as Solution Support Engineer @ SAP

  • ๐Ÿ”ญ Iโ€™m currently working on ABAP
  • ๐ŸŒฑ Iโ€™m currently learning Go, Image Processing & Data Science
  • โšก Technologies: Python, C, C++, ABAP, Image Processing, S/4HANA, SAP ECC

seam-carving's People

Contributors

gabrielkunz avatar lincolnvs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

seam-carving's Issues

Inverted colors when using plt.imshow()

When using the new added function plotResult(), the plt.imshow() call for the original image and the output are displayed with inverted colors. I've tried to plot them using the .astype(np.uint8) attribute, but without success.
Screen Shot 2020-09-26 at 11 22 25 PM

'AttributeError' when trying to use Canny edge detector for energy mapping

I'm trying to implement the Canny edge detector in the BackwardEnergy class for energy mapping by adapting the code from https://github.com/FienSoP/canny_edge_detector.

I've made some adjustments to call the edge detector by using the 'be.canny(img)' statement in the main program sc.py but I'm getting an 'AttributeError' when trying to run the program:

foo@bar ~ % python3 sc.py -in image.jpg -scale 0.5 -seam h -energy c
  0%|                                                     | 0/320 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "sc.py", line 236, in <module>
    img = resize(img, SCALE)
  File "sc.py", line 40, in resize
    img = seamCarving(img)
  File "sc.py", line 127, in calculateEnergy
    energy_map = be.canny(img)
  File "~/src/backward_energy.py", line 154, in canny
    self.energy_map = self.canny_edge_detector.detect(img, sigma=1.4, kernel_size=5, lowthreshold=0.09, highthreshold=0.17, weak_pixel=100)
AttributeError: 'CannyEdgeDetector' object has no attribute 'detect'

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.