Hi! I am a software engineer who is interested in various fundamental computer science topics and like to understand how things work under the hood.
You can reach me using the followings:
Simple and minimalistic photo picker for iOS written in Swift
Swift macro that provides a simple way to retry functions that might throw an error
Swift 1
import Accelerate
/// A function for checking two images for similarity.
/// The returned result is the percentage of similarity, where 1 is the result of comparing identical images.
/// The implementation uses Accelerate to speed up similar operations on vectors.
import Accelerate
func calculateHistogram(image: CGImage) -> [[vImagePixelCount]] {
let format = vImage_CGImageFormat(
bitsPerComponent: 8,