Need help on data types and class implementation
I need to implement a class which will be used for same image operations. Class should store image data and have methods to do:
- cropping (this will return object of same class)
- binarization of image (making it black-white with specific threshold)
- some other stuff based on direct pixel manipulation (so I need access to raw data)
I'd need some advices on data types to use. What to use for storing image data? NSImage, CGImage, CIImage? Which of those can help me binarize image? With which could I do pixel manipulation?
I was thinking in saving image data in 2-D array and then implement my binarization method and others. But how do I get 2D array of pixels and how to mak开发者_Go百科e of that image later?
Thank you!
If you are allowed to use 3rd party libraries, take a look at OpenCV.
精彩评论