Questions tagged [cvpixelbuffer]
159 questions
1
vote
1 answer
Capture Image AVMetadataFaceObject with didOutputSampleBuffer:
I am trying to capture the face area.
Here is what I do , in didOutputMetadataObjects: is get the AVMetadataFaceObject and process it in didOutputSampleBuffer
didOutputMetadataObjects shows marker correctly, where I consider the Yaw, roll axis
What…

NNikN
- 3,720
- 6
- 44
- 86
1
vote
1 answer
Memory Leak in iOS converting an image to CVPixelBufferRef
I am trying to convert an image to CVPixelBufferRef so that is can be used further but after some seconds my app is crashing. I can see when app is starting it is using memory like 2mb but after just 15 to 20 seconds it goes upto 300mb. My function…

Asim Shahzad
- 11
- 2
1
vote
0 answers
Video with transparent background created from AVAssetWriterInputPixelBufferAdaptor turns into black background
I am Creating video by capturing screen images with render context after every 0.01 second. The Captured images having the transparent background. But when creating video with these images using AVAssetWritter, AVAssetWriterInputPixelBufferAdaptor…

Parminder Kaur
- 11
- 2
1
vote
1 answer
How to create CVPixelBuffer attributes dictionary in Swift
To create a CVPixelBuffer attributes in Objective-C I would do something like so:
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey,
…

nwales
- 3,521
- 2
- 25
- 47
1
vote
1 answer
VTCompressionSessionEncodeFrame error code -12902
I have a function that takes a CVImageBufferRef and passes it to my VTCompressionSession for processing.
The VTCompressionSession is started and my call to VTCompressionSessionCreate is successful.
I am retrieving a video URL from the photo library…

JuJoDi
- 14,627
- 23
- 80
- 126
1
vote
1 answer
iOS AVAssetWriter Video Height "Squished" when exported to from UIImages
We are exporting video using AVAssetWriter from UIImages which are first converted to CVPixelBufferRef's - but the images are "squished" in the video by a 160 pixel high black "bar" of empty pixels across the bottom.
Given that the images are…

Praxiteles
- 5,802
- 9
- 47
- 78
0
votes
0 answers
Converting 10 bit Y'CbCr to 8 bit RGB using vImageConvert_YpCbCrToARGB_GenerateConversion on iOS
Given a CVPixelBuffer with format kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange, I'm trying to generate a corresponding 8-bit RGB frame for further processing. I understand this will be a lossy conversion – the RGB frame will just be used to…

tenuki
- 101
- 7
0
votes
0 answers
Convert Data to stream of CVPixelBuffer
How to convert Data to stream of CVPixelBuffer,
I am working on CVPixelBuffer output from AVSession and ARSession.
following is the code on which I am converting CVPixelBuffer to Data and able to save the data as a file, Now I want to read the same…

dip
- 3,548
- 3
- 24
- 36
0
votes
0 answers
A fast way to extract channels data from CVPixelBuffer of ARGB format
I have CVPixelBuffer that has kCVPixelFormatType_32ARGB format. I need to extract each channel and store it to separate CVPixelBuffer. I imagine the usage of it like this
let channels: [CVPixelBuffer] = pixBuffer.split()
So this, for the time being,…

Eugene Alexeev
- 1,152
- 12
- 32
0
votes
0 answers
decompressing video on different platforms, value of pixels differ
I got the wrong pixel values between Swift iOS and OpenCV Python.
In Python, I read video with video.read() and got BGR 79, 82, 90 of the first pixel.
In Swift, I read the video by AVURLAsset and I got BGR 80, 84, 92.
It seems quite the same, but…

nguyencse
- 1,028
- 9
- 17
0
votes
2 answers
In Flutter, how do I display CVPixelBuffer from iOS in a Widget?
I have a Flutter app that calls an object detector in CoreML via the iOS platform channel. I would like to ensure the model is getting the image in the correct format by viewing it in a Flutter widget.
I have access to the CVPixelBuffer data. How do…

Fred
- 381
- 5
- 17
0
votes
0 answers
What exactly does CVBufferSetAttachment do?
I understand the CVBufferSetAttachment simply appends metadata attachment to the sample buffer in a dictionary. But I see there are no errors in appending metadata that is contradictory in nature. For instance, for the sample buffers received from…

Deepak Sharma
- 5,577
- 7
- 55
- 131
0
votes
0 answers
Google MLKit PoseDetection issue with CVPixelBuffer
I'm trying to implement pose detection using GoogleMLKit PoseDetection
And for faster performance, I use CVPixelBuffer to create the MLImage, which gets passed to PoseDetector's results(in:) method.
The problem is that when I pass CVPixelBuffers…

mrpaw69
- 155
- 9
0
votes
0 answers
The CVPixelBuffer created from UI image is nil or empty
I tried to create a CVPixel buffer of the size 299x299 and the format of kCVPixelFormatType_32BGRA First I tried to resize the Ui image to 299x299 and then tried converting the UI image to CvPixelBuffer and then I again tried to convert the…
0
votes
0 answers
Memory issue in using CVPixelBufferPoolCreatePixelBuffer
I'm converting a CIImage to CVPixelBuffer for using in a streaming, so this conversion will happen 25-30 times per sec and need to be fast
So i heard if I use buffer pool, the performance will be good, here is the process that I do for it
private…

Marcus FK
- 23
- 4