OpenCV C++/Obj-C: Detecting a sheet of paper / Square Detection

I successfully implemented the OpenCV square-detection example in my test application, but now need to filter the output, because it’s quite messy – or is my code wrong? I’m interested in the four corner points of the paper for skew reduction (like that) and further processing … Input & Output: Original image: click Code: double angle( … Read more

UITableViewCell show white background and cannot be modified on iOS7

I’ve implemented a custom table view cell class that inherit from UITableViewCell. The tableview contains a background image, so I want cell’s background to be transparent. It looks great before iOS7. However, in iOS7, the cell is always shown with a white background. Even for Xcode7, 2015, there is a bug in storyboard: you have … Read more

How do I pass multiple parameters in Objective-C?

I have read several of the post about Objective-C method syntax but I guess I don’t understand multiple names for a method. I’m trying to create a method called getBusStops with NSString and NSTimeInterval parameters and a return type of NSMutableArray. This is how I have constructed the method but it obviously gets errors at … Read more

What are the details of “Objective-C Literals” mentioned in the Xcode 4.4 release notes?

I was going through the release notes for Xcode 4.4 and noticed this: LLVM 4.0 Compiler Xcode now includes the Apple LLVM Compiler version 4.0, including the following newObjective-C language features: […] – Objective-C literals: create literals for NSArray, NSDictionary, and NSNumber, just the same as the literals for NSString I’m intrigued about this feature. … Read more

In Objective-C, what is the equivalent of Java’s “instanceof” keyword?

I would like to check whether an object (e.g. someObject) is assignable (cast-able) to a variable of another type (e.g. SpecifiedType). In Java, I can write: someObject instanceof SpecifiedType A related question is finding whether the runtime type of an object is equal to a another type. In Java, I can write: someObject.getClass().equals(SpecifiedType.class) How can … Read more