I have a mediapipe workflow containing a video stream input from webcam. I woudl like to load an additional single constant image into the pipeline and load this image as gpubuffer(once), so that a new calcucaltor node(default mediapipe) can take the current video frame(gpubuffer) and the constant image as its inputs.
What would be the ideal way to accomplish this task so that we could keep the cpu-gpu memory copy to minimum. Should we create a custom side packet calculator to load the image or should we create another input stream to the pipeline? Also there seems to be a operator called 'OpenCvEncodedImageToImageFrameCalculator'; but it takes a raw string as its input.
In the following link solves the problem to an extend; but it seems to involves lot of cpu-gpu memory copies and some extra processing steps.
Ref: https://towardsdatascience.com/custom-calculators-in-mediapipe-5a245901d595