Questions tagged [cvpixelbuffer]
159 questions
0
votes
2 answers
How to copy a CVPixelBuffer in Swift?
I'm trying to port some ObjC-Code to Swift. The code is part of the Flutter Camera-Plugin (line 265). The plugin allows a live preview of the camera.
As a Swift programmer I have no idea what is happening here. What does…

hendra
- 2,531
- 5
- 22
- 34
0
votes
0 answers
Writing 0-Alpha in Metal shader doesn't render correctly
I'm trying to Chroma-Key an mp4 video playing over a UIView.
I'm getting a texture every frame like so:
var fullTex:CVMetalTexture?
let w = CVPixelBufferGetWidthOfPlane(pixelBuffer, 0);
let h = CVPixelBufferGetHeightOfPlane(pixelBuffer,…

Chris
- 2,739
- 4
- 29
- 57
0
votes
1 answer
Render Alpha image on CVImageBufferRef
I am trying to achieve this effect . you can check this effect in musical.ly app (ripple effect)
https://drive.google.com/open?id=1uXExnmWQ7OfSGLFXdH7-5imay8tW87vO
Here is my approach.
I will render alpha and scaled image to pixel buffer I am…

varun gakhar
- 13
- 1
- 5
0
votes
1 answer
How to draw text into CIImage?
How to draw into CIImage (or maybe into CVPixelBuffer, but I guess it easier to add text to CIImage)? not to UIImage
I record video (.mp4 file) using AVAssetWriter and CMSampleBuffer (from video, audio inputs). While recording I want to add text on…

user924
- 8,146
- 7
- 57
- 139
0
votes
1 answer
How to create and reuse an array of CVPixelBufferRef?
In my application I need to
Create 24 CVPixelBufferRef
Add them later to AVAssetWriterInputPixelBufferAdaptor in a custom order to write an mp4 movie.
The VideoExport::addFrame function receives raw pixel data and stores it in the next empty…

Thinium
- 171
- 1
- 14
0
votes
2 answers
Converting UIImages to CVPixelBufferRef and Back Causes Constant Memory Increase & Eventual Crash
I am loading images from disk, converting them to CVPixelBufferRef, doing some stuff, then converting back to UIImage to save back to disk. I have tried to make sure I release absolutely everything necessary, yet memory usage for my app always…

Maxi Mus
- 795
- 1
- 6
- 20
0
votes
1 answer
Why does CVPixelBuffer.GetAttributes take an argument of type NSDictionary?
In Xamarin.iOS, The method CVPixelBuffer.GetAttributes has a parameter "attributes" of type NSDictionary. For example is might be called like so:
myPixelBuffer.GetAttributes(myAttributesDictionary);
This makes no sense. Isn't the point of a Get…

Perrin Larson
- 562
- 4
- 14
0
votes
0 answers
What is the fastest way to get NSAttributedString drawn into a CVPixelBufferRef
What is the most performant means for getting text via NSAttributedString:drawAtPoint into a RGBA32 CVPixelBufferRef?
Just to clarify my objective...
I'm being handed CVPixelBufferRef objects @60fps via a CVDisplayLink whilst a movie is playing. …

zzyzy
- 973
- 6
- 21
-3
votes
1 answer
How to convert a UIImage to a CVPixelBuffer 32BGRA for mediapipe?
I am using mediapipe to develop a iOS application, now I need input an image data to the mediapipe, but mediapipe only accepted 32BGRA CVPixelBuffer.
how can I convert UIImage to 32BGRA CVPixelBuffer?
I am using this code:
let frameSize =…

normidar
- 445
- 5
- 11