How to draw UIImage image histogram on iPhone programmatically? eg:.
Thank!
Actually there is, I will answer your answer to Brad Larson: fooobar.com/questions/440991 / ...
You can find the GPUImageHistogramFilter class in your library: https://github.com/BradLarson/GPUImage
The demo version of "Filter Showcase" in lib already has a working version of the live histogram analysis.
There is no api for this.
Edit: The API was introduced with iOS5. See kelin's answer.
, .
: UIImage (Cocoa Touch) CGImage (Core Graphics)?
CoreGraphics UIView.
. vImageHistogramCalculation_ARGB8888(). , vImage_Buffer UIImage. vImageBuffer_InitWithCGImage().
vImageHistogramCalculation_ARGB8888()
vImageBuffer_InitWithCGImage()
:
Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h
You may be interested in DSBarChart . Give it a try.