mirror of
https://github.com/zhigang1992/PerspectiveTransform.git
synced 2026-01-12 22:49:33 +08:00
27 lines
712 B
Objective-C
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
|