GithubHelp home page GithubHelp logo

advice for face morph about learnopencv HOT 7 CLOSED

spmallick avatar spmallick commented on April 29, 2024
advice for face morph

from learnopencv.

Comments (7)

leoneckert avatar leoneckert commented on April 29, 2024

I tried to hack together a solution by adding a 127 grey line to the masks, but that's not a good solution....
screen shot 2017-03-18 at 14 39 40

from learnopencv.

leoneckert avatar leoneckert commented on April 29, 2024

am I likely to have a rounding error somewhere? int vs float? I tried everything :D

from learnopencv.

leoneckert avatar leoneckert commented on April 29, 2024

:D :D i am glad you didn't reply yet, found the error myself and feeling oh so good.
it was a typo that I could only find after understanding everything about masks that I didn't understand before -- I learned a lot. thanks and sorry for the many messages here!

from learnopencv.

spmallick avatar spmallick commented on April 29, 2024

No problem! Glad that you figured it out yourself. I am traveling and so was not able to get back to you.

from learnopencv.

conradhappeliv avatar conradhappeliv commented on April 29, 2024

@leoneckert can you post what the problem/solution was? I am also having the same issue and I'd like to know how you fixed it. 😫

from learnopencv.

leoneckert avatar leoneckert commented on April 29, 2024

@conradhappeliv I find it hard to believe you would do the exact same mistake, but as far as I remember I just mixed up one of the operators in the line below, using a "+" instead of a "*" in one spot...

# Copy triangular region of the rectangular patch to the output image
img[r[1]:r[1]+r[3], r[0]:r[0]+r[2]] = img[r[1]:r[1]+r[3], r[0]:r[0]+r[2]] * ( 1 - mask ) + imgRect * mask

same problem?

from learnopencv.

conradhappeliv avatar conradhappeliv commented on April 29, 2024

@leoneckert Finally figured it out! It was similar but not the same. You were right that the masks were overlapping by a pixel. I just set each mask to 0 wherever image data was already in the output.

from learnopencv.

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.