I will need to identify, rotate and crop a rectangle(business card) from a photo took from an iphone. I believe this can be done by using OpenCV, but I have not used it before. Could anyone give some tips on this?
If you see the Visual Look Up icon, tap it or swipe up. An icon will appear on the photo. Note that the icon varies depending on the image it detects. For example, a pin icon will appear for landmarks and a paw print icon for animals.
Erase a mistake Tap the eraser tool in the Markup toolbar in a supported app, then do one of the following: Erase with the pixel eraser: Scrub over the mistake with your finger. Erase with the object eraser: Touch the object with your finger.
Square. Square mode limits the frame of your camera screen to a square — the optimal photo size for many social media apps. So when you take a photo, you can quickly share it on your favorite social platforms.
From iOS 8, you can now use the new detector CIDetectorTypeRectangle that returns CIRectangleFeature. You can add options :
Aspect ratio : 1.0 if you want to find only squares for example
CIImage *image = // your image
NSDictionary *options = @{CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorAspectRatio: @(1.0)};
CIDetector *rectangleDetector = [CIDetector detectorOfType:CIDetectorTypeRectangle context:nil options:options];
NSArray *rectangleFeatures = [rectangleDetector featuresInImage:image];
for (CIRectangleFeature *rectangleFeature in rectangleFeatures) {
CGPoint topLeft = rectangleFeature.topLeft;
CGPoint topRight = rectangleFeature.topRight;
CGPoint bottomLeft = rectangleFeature.bottomLeft;
CGPoint bottomRight = rectangleFeature.bottomRight;
}
More information in WWDC 2014 Advances in Core Image, Session 514.
An example from shinobicontrols.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With