@@ -103,14 +103,14 @@ - (void)drawTextRect:(CIImage*)image{
103103 // text
104104 VNDetectTextRectanglesRequest *textLandmarks = [VNDetectTextRectanglesRequest new ];
105105 textLandmarks.reportCharacterBoxes  = YES ;
106-  VNSequenceRequestHandler *faceLandmarksDetectionRequest  = [VNSequenceRequestHandler new ];
107-  [faceLandmarksDetectionRequest  performRequests: @[textLandmarks] onCIImage: image error: nil ];
106+  VNSequenceRequestHandler *handler  = [VNSequenceRequestHandler new ];
107+  [handler  performRequests: @[textLandmarks] onCIImage: image error: nil ];
108108 for (VNTextObservation *observation in textLandmarks.results ){
109109 // find text rectangle
110110 for  (VNRectangleObservation* box in observation.characterBoxes ){
111111 // draw rect on each char of the text
112112 CGRect boundingBox = box.boundingBox ;
113-  NSLog (@"  |-%@ " 
113+ //  NSLog(@" |-%@", NSStringFromCGRect(boundingBox));
114114 CGSize size = CGSizeMake (boundingBox.size .width  * self.sourceImgView .bounds .size .width , boundingBox.size .height  * self.sourceImgView .bounds .size .height );
115115 CGPoint origin = CGPointMake (boundingBox.origin .x  * self.sourceImgView .bounds .size .width , (1 -boundingBox.origin .y )*self.sourceImgView .bounds .size .height  - size.height );
116116
@@ -186,7 +186,7 @@ - (IBAction)useCamera:(id)sender {
186186 [self  presentViewController: picker animated: YES  completion: NULL ];
187187 }else {
188188 UIAlertController* alert = [UIAlertController alertControllerWithTitle: @" No camera found!" 
189-  message: @" Are you on simlulator ? Use an actual device or try picking an image from gallery" 
189+  message: @" Are you on simulator ? Use an actual device or try picking an image from gallery" 
190190 preferredStyle: UIAlertControllerStyleAlert];
191191 UIAlertAction* defaultAction = [UIAlertAction actionWithTitle: @" OK" style: UIAlertActionStyleDefault
192192 handler: ^(UIAlertAction * action) {}];
0 commit comments