Create camera overlay to read OCR Code in swift - ios

I am working an application which is using OCR code reading functionality, but i want to make a overlay on camera, like some portion of camera will read the code and other view on screen will show with blur effect.I am stuck here...please help...thanks..

Create a CustomOverlay View and use it.
I did similar kind of demo app.
Please check here:https://github.com/RaviiOS/BarCodeScanDemo/tree/master/BarCodeScanDemo

Related

UIImagePickerController with Custom Overlay and Edit Image

I am taking picture using UIImagePickerController with custom overlay view. I have a requirement to enable native editing mode of UIImagePickerController when photo is taken and user taps "Edit" button which is on my custom overlay view.
I have set:
imagePickerController.showsCameraControls = NO;
How is this possible to achieve?
Thanks,
You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are responsible for opening the iPhone's camera and record video or capture audio. It calls the same classes which are called by UIImagePickerController. So your camera will open and start taking input.
Now, if you open the xib file of that AVCam project, you'll find a small UIView object. This view is responsible for displaying the camera's feed. You can resize that view as per the size you want and the camera's input will be displayed in that much area. You can also put the frame image around it as per your choice.
It worked for me when I wanted to resize the camera's input feed and capture photos. I hope it works for you as well.

Creating Custom Image Picker Controls- applying cropping

I am designing a custom image picker, for that I am using view controllers, I have successfully used camera to take picture and proceed it to PreviewControllerVC, now I want to apply cropping on that screen.
any suggest.
I found the answer myself, HIPImageCropperView is the library i used for it.
It's best for this purpose.

iOS: UIImagePicker or AVCam for this functionality

I am looking for a way to add a custom button on camera preview and don't know where to go. Just like the iOS native camera, on the left of the capture button, you can click on it and access photo library. How can we add a button to the camera preview view? Would anyone be kind enough to give some directions? Thanks in advance.
Take a look at UIImagePickerController's cameraOverlayView. This lets you lay your own interface on top of the default camera interface.
Check out this sample project. It shows the preview of the camera in a custom UIView and uses AVCaptureSession for the management of the video preview. You can add whatever you want in the custom UIView as you like.

CameraRoll Button using UIImagePickerControllerSourceTypeCamera?

I want my camera ui will have the regular Camera Roll button. The one that you have when you open the camera app. Is there a simple way doing that or I'll have to use a custom layer? Tried searching in the documentation without success.
There is not an easy way to do it. You should implement your own custom toolbar to replicate the camera app behavior. You should use the overlay view property of the imagePicker. Have a look at this link for a possible implementation

Creating a Camera View similar to Instagram, Path, or Photovine

I haven't worked with the iPhone's camera much.
I've done basic apps using UIImagePickerViewController but that only shows the basic camera functions.
What are apps like Instagram, Path, or Photovine using to make the cooler layout with more options?
Thanks for the help!
They are essentially using a cameraOverlayView over the UIIImagePicker.
You can read about it here.
And get an apples sample code here. http://goo.gl/RPwtD

Resources