New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible get processed frames from RenderView as CVPixelBuffer (CVBuffer)? #218
Comments
Yes, you can use a raw data output to capture the bytes at the step before they are displayed by the RenderView, and then create a pixel buffer from those. |
Thanks for the reply @BradLarson Only way I can use renderview if I use like this where can i add rawdataoutput in this setup? |
You can add it in parallel: camera --> filter --> renderview and the filter will output to both the raw data output and the RenderView. |
hmm but will this effect the performance ? isnt this like processing frames twice or not? |
No, the only thing that will impact performance is the actual extraction of the bytes. The filter only runs once and provides the same texture to both the RenderView and the raw data output. You're going to need to get the bytes out some way, and the raw data output is how you do that. I don't believe I yet have my fast path for grabbing these bytes from the raw data output in this version of the framework, but if you need that you can examine what I did in the Objective-C one. |
Will do that for sure. |
Hi @BradLarson, But, as soon as I add rawoutput as additional output - it drastically reduce performance: from 20fps to 15 fps on iPhone6Plus. It doesnt depend on dataAvailableCallback operations. Is it possible to avoid such behavior? Thanks. |
Hey,
I am trying to use processed frames shown on RenderView in Core ML. For that CVPixelBuffer is required. How can this be archived?
By the way CVPixelBuffer is an actually a typealias of CVImageBuffer which is also a typeallias of CVBuffer. So these types work as well.
I also checked RawDataOutput but I want to show these processed frames on screen as well
The text was updated successfully, but these errors were encountered: