Giter Site home page Giter Site logo

Comments (4)

bootchk avatar bootchk commented on May 24, 2024

Thanks. I think I understand what you want. But I am not sure it will work. I might get a chance to try it, but it requires changes to the C code (a little more involved than if it were only to the Python wrapper.) Those are my initial thoughts, but it certainly is interesting, and I could be wrong.

The reason I think it might not work is: that would be like a wavefront algorithm. In my experience, the farther you get from where the wavefront starts, the less chance that the results will be good. I.E. the pixels in the center of the resynthesized border might not be good. It might work better if it was a three-sided wavefront from all the non-border edges.

Also, a better algorithm might be to copy/paste a section of the border from somewhere else onto the image outside the border (in a temporary image) and then heal from the sides, harvesting the copied sections of the border. That idea too might not always work. Possibly that could be done all in the Python wrapper. Any user can already do something similar by using the full control panel "Filter>Resynthesizer" which lets you choose a separate corpus, where in this case you would fabricate a separate corpus image from nearby sections of the border. Yes, it is tedious and your idea would save time.

Again, interesting, but I can't promise I will do it.

from resynthesizer.

kwokyinc avatar kwokyinc commented on May 24, 2024

Thanks for the tips! How come I never thought of expanding the canvas and fill it with a temporary image!! I just did that and filled the expanded area with something (anything would do coz it will be cropped eventually). Then I select an area covering both the area I want to patch and the expanded image such that the "original image border" falls roughly in the central line of the area of selection. Then I apply resynthesizer. Now it's magic. I get what I want. Then all I need to do it just to crop back the image to the original size.

It would still be nice to have the "from left to right" etc options. But if it's really a hassle to code such thing in C, then I guess the above workaround is good enough to do the trick. Thanks.

from resynthesizer.

bootchk avatar bootchk commented on May 24, 2024

Cool. I never thought of those details either, that it doesn't really matter what you fill the expanse with. That could be automated in a Python plugin. Called something like "Heal Selection On Border."

But I was wondering why, on the right edge, Heal "from top and bottom" doesn't work. I suppose your case is that top and bottom are sufficiently different from what is to the left that the result is not what you expect. I need to experiment more with various cases.

from resynthesizer.

kwokyinc avatar kwokyinc commented on May 24, 2024

I suppose your case is that top and bottom are sufficiently different from what is to the left that the result is not what you expect.

Yes. That is exactly my case.

from resynthesizer.

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.