Files
PerspectiveTransform/Example/OpenCV-OSX-Tests/OpenCVWrapper.h
Paul Zabelin 7a1ea1566e add cvGetPerspectiveTransform
another OpenCV method to solve the same problem
add spec to prove the result is the same
2018-03-04 01:22:44 -08:00

27 lines
712 B
Objective-C

//
// OpenCV_Spec.h
// PerspectiveTransform
//
// Created by Paul Zabelin on 2/26/18.
// Copyright © 2018 CocoaPods. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <QuartzCore/QuartzCore.h>
typedef struct Quadrilateral {
CGPoint upperLeft;
CGPoint upperRight;
CGPoint lowerRight;
CGPoint lowerLeft;
} Quadrilateral;
@interface OpenCVWrapper: NSObject
+ (CATransform3D)findHomographyFromQuadrilateral:(Quadrilateral)origin
toQuadrilateral:(Quadrilateral)destination;
+ (CATransform3D)perspectiveTransform:(Quadrilateral)origin
toQuadrilateral:(Quadrilateral)destination;
@end