Coder Social home page Coder Social logo

Comments (8)

tmilker avatar tmilker commented on July 2, 2024 1

@troypesola @brunodoamaral You can get a transparent background out of this plugin by placing video source in it's own scene, adding the plugin as a filter, then placing that scene in your scene and filtering that with the ChromaKey filter.

from obs-backgroundremoval.

royshil avatar royshil commented on July 2, 2024

my major hurdle so far is allocating new memory for the obs_source_frame *frame output.

a lot of the problem (and resources) is colorspace conversion, if I can allocate new memory and put the RGBA in there, and set the frame->format = VIDEO_FORMAT_RGBA, then this feature is trivial.

but so far i couldn't get the mem allocation down. i need to do some more research

but you're welcome to try it..

from obs-backgroundremoval.

troypesola avatar troypesola commented on July 2, 2024

I'll take a look when I have some time. I just wanted to check if you had looked at it. Good to know that the color space conversion is the challenge.

Feel free to close this one out.

from obs-backgroundremoval.

brunodoamaral avatar brunodoamaral commented on July 2, 2024

Hi @royshil. First thanks for building this plugin, it works really well!

As @troypesola suggested, I'm too trying to create an alpha output directly from obs-backgroundremoval plugin. Using it together with Chroma Key creates a "color border" effect when I try to make smooth edges.

I already have a working development setup and made some modifications to filter_render in order to create a BGRA image.

I'm new to obs plugin development (actually only a few hours) and tried a few combinations of video formats on video_scaler_create in a hope to output a BGRA frame, but so far I have no success.

If you have time, can you point the modifications necessary to make it work from a obs-plugin perspective? By this time I'm not concerned about memory issues, as you point out in a previous comment. But I'll take it in consideration if I submit a PR.

Best regards!
Bruno

from obs-backgroundremoval.

royshil avatar royshil commented on July 2, 2024

@brunodoamaral I think the new built in scalers can do this very easily. The mem allocation is trivial.
I can make an effort to implement this in the next couple days...
It's also needed for the "feather" feature that I just rolled out in the last version.

from obs-backgroundremoval.

brunodoamaral avatar brunodoamaral commented on July 2, 2024

@royshil thanks for your fast response.

I added a new feature for mask offset (it uses morphological operation to dilate or erode the mask). Combined with the feather feature, it create a nice fade affect.
But it didn't work well with Chroma Key. That's why I'm looking for some "native" alpha implementation.
I'll spend a few more time on it and came back if I found a solution. Anyway, I'll keep an eye on the progress from your side by subscribing to changes on github.

from obs-backgroundremoval.

mhcerri avatar mhcerri commented on July 2, 2024

Hi, @royshil ! First of all, thank you for the wonderful plugin!

Do you still have plans of implementing the alpha channel? That would be an awesome feature because it would allow smoother contours with transparent backgrounds. Currently when using a chroma key filter that's not possible because the contour would get tinted with the color used for the chroma key.

from obs-backgroundremoval.

royshil avatar royshil commented on July 2, 2024

@mhcerri I'm working on the alpha channel right now as well as a 27.1.3 (latest) OBS version

from obs-backgroundremoval.

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.