Giter Club home page Giter Club logo

Comments (16)

esimov avatar esimov commented on June 8, 2024 1

Now it should work also when percentage is used. Right now I'm working on some updates to facilitate the GUI debugging. Once it's done and the GUI debug mode is enabled it will be much easier for everyone to get a real sense how the algorithm is working.

from caire.

esimov avatar esimov commented on June 8, 2024

What I can see at a first sight is that the source image and the mask image has two different size. The mask image should have exactly the same size as the source image to work properly. The logic behind is identical with the face detection: I'm just making some XOR operations with the image mask and the sobel operator, in other words the zones which have more white patches are not altered by the seam carver.

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

Sorry I had uploaded the wrong image. This is the correct mask image I had used
sal_example
The output is same as before

from caire.

esimov avatar esimov commented on June 8, 2024

Looks like that for vertical resizing something is not working quite well. For horizontal resize this is what I got using the following command:

$ caire -in testdata/sample.jpg -out output.jpg -perc=1 -width=50 -mask "mask.jpg" -debug=1

output

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

This is decent output. Is there any workaround to make it work for vertical resizing as well? I need the solution for both horizontal and vertical resizing. Seems like the algorithm is not considering the top pixels for this image, those top pixels(vertical), seem very similar to the horizontal ones (at least visually). So not sure whats going wrong

from caire.

esimov avatar esimov commented on June 8, 2024

I'll have to debug it. Sure it should work both for horizontal and vertical resizing equally.

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

Thank you @esimov.

from caire.

esimov avatar esimov commented on June 8, 2024

This issue should be fixed now. You should pull out the new code changes. Let me know if it's working for you.

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

I pulled the latest code and ran it again, but still seeing the same output.

I am using the following commands to run the algorithm:
1.) cd cmd/caire
2.) go build main.go
3.) go run main.go -in example.jpg -out output.jpg -width=500 -height=300 -mask sal_example.jpg

Please let me know if I am doing something wrong here

output

from caire.

esimov avatar esimov commented on June 8, 2024

I have completely rewritten a few parts of the seam carver algorithm. There were a few things which didn't worked properly on vertical resizing, so normally the issue should be fixed now.

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

I tried the latest code. There still seems to be distortion in the masked objects (sometimes moderate, sometimes severe). Also, it seems a lot of times algorithm just ignores the background leaves to carve out.

go run main.go -in example.jpg -out output.jpg -width=500 -height=300 -mask sal_example.jpg

output_latest

go run main.go -in example.jpg --perc=1 -out output.jpg -height=10 -width=50 -mask sal_example.jpg

output_height_10_width_50

from caire.

esimov avatar esimov commented on June 8, 2024

I can confirm that the last example is not working as expected. I will check it soon.

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

Thank you @esimov. Will look forward to the solution

from caire.

kartikwar avatar kartikwar commented on June 8, 2024

I closed this by mistake. Reopening it

from caire.

esimov avatar esimov commented on June 8, 2024

If you don't have any objections I would close this ticket.

from caire.

esimov avatar esimov commented on June 8, 2024

Since I didn't get any response I will close this ticket.

from caire.

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.