How to scale MediaPipe image to full renderwindow

Hey everybody,
I try to scale the image that comes from the MediaPipe to the whole window.

I looked in the help browser but couldn’t find anything in the mediapipe patches nor something for IRenderer.

Thanks in advance!

It is not possible AFAIK… if you want to use the texture from the webcam as a separate layer, you need to implement a workaround here: Grab the webcam texture in vvvv and then send it via Spout or NDI to a virtual camera. You can then select this camera as an input for MediaPipe.

For reference: VL.MediaPipe - #41 by chk

Oh wow :/ Thats a shame! Ok I will have a look. Thanks for the help


This basically done it for me

Weird, I remember trying exactly that back then, and for me it only worked when setting the resolution to 640*360 - like also written in the other VL.MediaPipe thread. But now I tried it again, and apparently it works, when setting the resolution and then restarting the patch! Awesome!

I was already experimenting around with the same question a year ago, here are my first two results how I solved it to combine skia overlays with the RGB image from the camera, as well as a persistant Window/Renderer-Size with the correct aspect ratio and also added the “Blend”-Solution as “3” as @levoxtrip and @chk suggested:

1.) QuadRenderer → WithinCommomSpace → RenderWindow

  • worked the best for me, as the height always fits the RenderWindow (AutoHeight) and the aspect Ratio is correct, however I only got AutoHeight to run as expectet and struggled with FitIn/FitOut/AutoHeight to behave as I expected.
  • needs more compliacated settings on Scale, QuadRenderer, WithinCommonSpace and the RenderWindow if you set it up from scratch
  • Adds another Renderer with the QuadRender, this might drage some performace?
    → however on my Laptop (i7 RTX4070) it performs very well even with all three variations at the same time and 1920x1080 resolution.

2.) Background → RootScene → SceneWindow

  • keeps the aspect ratio for AutoHeight and AutoWidth, so in many use cases as e.g. portrait format, this might be the best setup. If you want to avoid cropping on the Height, you’d prefer going for 1.
  • Adds another Renderer with the QuadRender, this might drage some performace?
    → however on my Laptop (i7 RTX4070) it performs very well even with all three variations at the same time and 1920x1080 resolution.

3.) RenderTexture → Blend → TextureWindows

  • also works great, but aspect ratio gets distorted in the TextureWindow
  • if you want to just continue using it as a Texture, this might be your preffered option
  • VL.Addons needs to be added for the “Blend” Node

I might clean up the patch a bit and add it later.

Ah, and be aware: you really always need to trigger a reset at the MediaPipe Node when changing the resolution for the camera as already mentioned above. Sometimes I also had MediaPipe not detecting anything afterwards or freezing and needed to restart the patch (f9).