I'm trying to learn how to use Bridging Headers in this test project. For this part, I want to have a method where it takes in and returns a CGPoint array.
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
@interface OpenCVWrapper : NSObject
+ (UIImage *)grayscaleImage:(UIImage *)image;
+ (UIImage *)gaussianBlurImage:(UIImage *)image;
+ (UIImage *)cannyEdgeImage:(UIImage *)image;
//Error says Expected a type
+ ([CGPoint *])lineEdges:([CGPoint *])points;
@end
Because I'm new to this, I don't know where to even start looking for a problem.
Since you need to return an array of CGPoint, your array should hold a NSValue type, because the array cannot hold struct type
and you should call your method as
The return value also should be in NSValue and extracting