Cedric
Cedric

Reputation: 899

vImage from UIImage or from file - Swift and Accelerate framework

I would like to know how to instantiate a vImage object in Swift, either from a file or from another image container object (UIImage, CGImage). The Apple documentation on the subject seems sparse and a bit confusing. It seems like it simply needs a basic data structure pointer (a bit like the data uchar* variable of the cv::Mat structure in OpenCV), though I am not sure how to obtain this in Swift.

Thanks!

Upvotes: 0

Views: 332

Answers (1)

Ian Ollmann
Ian Ollmann

Reputation: 1592

See vImageBuffer_initWithCGImage()

Some translation to swift may be required.

Upvotes: 1

Related Questions