ios – Metallic Core Picture kernels for Picture statistics

Spread the love

ios – Metallic Core Picture kernels for Picture statistics – Stack Overflow


10 instances

I’m at the moment computing histogram, waveform, and vectoroscope utilizing Speed up and Metallic shaders. This code is for 8-bit SDR pixel buffers and it really works. I need to rewrite them utilizing Core Picture in order that they will work for each 10-bit HDR & SDR buffers.

  1. Speed up works very nicely for histogram for 8-bit photographs. Nevertheless it doesn’t assist 10bit YCbCr pixel buffers. CoreImage helps it however it’s unclear how one can seize uncooked histogram knowledge from the CIAreaHistogram output in order to show it utilizing CoreGraphics or MTKView. The builtin histogram CIHistogramDisplayFilter to show histogram has much less flexibility. I additionally need histogram of luminance as nicely aside from rgb.

  2. I exploit atomic_fetch_add_explicit in Metallic shaders to compute statistics akin to Waveform and vectoroscope. It appears Metallic core picture kernels haven’t any assist for atomics. Is there any approach to do the identical in CoreImage?

For the histogram, I believe you may have two choices:

In regards to the atomics: If you have already got a working Metallic implementation for these statistics, I might advocate you write a CIImageProcessorKernel round it. It is made for this actual objective: together with customized picture processors right into a Core Picture pipeline. Particularly working with Metallic may be very handy, as you already get a Metallic gadget, textures, and a command buffer to work with.



Leave a Reply

Your email address will not be published. Required fields are marked *