BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.23k stars 4.61k forks source link

GPUImageAverageColor had a better way to get a average color ? #2426

Open erickingxu opened 7 years ago

erickingxu commented 7 years ago

Hi @BradLarson , I need to caculate a color average value for full frame image everytime.So using GPU , I found it is very difficult to do, and I read your shader and method in GPUImageAverageColor, it is surely a good idea for using gpu hardware interpolation . And if I choose a 8x4 or 8x8, or 16x16 area for interpolation, and that it to be less time with for-loop. Is it a right method for get faster for your method?

Another method, can I use once gpu draw for drawing a frame to 1*1 texture, and read this texture for get average color?

StromanStroman commented 4 years ago

I do not quite understand the way GPUImageAverageColor use,can anyone explain it?