iOS live camera overlay AVCaptureSession - ios

So this is a general question but was looking for a lead on how to have the live camera view with the ability to add images on top and take a pic. So basically you can select like a "Hat" image that overlays on the camera, adjust its size and position, then take a pic and the "Hat" will be on the image you took. I saw a few directions like AVCaptureSession but was not sure if anyone has done something like this to point me in the right direction.

Here is answer how to add a video layer:
Get Camera Preview to AVCaptureVideoPreviewLayer
You could add a subview on the top of your video view and then take a screenshot:
Why does my programmatically created screenshot look so bad on iOS 7?

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.

iOS Camera Preview Method on entry - Overlay Issue

how can I know when the camera preview is showed after the picture is taken? I want this because I'm using an overlay and when the app goes to the camera preview, the bottom bar gets smaller and so my overlay doesn't cover all the screen, all that I want is to resize this overlay when the camera preview is shown.
I solved using a translation for down on "camerapicker.transform" property, so now taken picture would be at the same position as while taking the photo, so the overlay would also would be in the same position.

Is there a view controller for image crop and rotate works like iOS 8 photo.app?

I need a view controller for user to crop and rotate image.
And I think the UI which iOS8 photo app did is very awesome
But I found only these two :
https://github.com/heitorfr/ios-image-editor
https://github.com/kishikawakatsumi/PEPhotoCropEditor
These are useful, but when making image smaller than the crop area, to move or rotate the image is very difficult, and the respond is very weird.
After using these, I think the iOS8 photo app's crop and rotate function is much better
So is there a view controller performs image crop and rotate like iOS 8 photo app?
Try The following:
https://github.com/itouch2/PhotoTweaks
https://github.com/yackle/CLImageEditor
They enables similar functionality as the native Photos app in iOS8.

Live zoomed view in an inset kind of box , when clicking pictures on camera view in iOS

I wan't to achieve the following thing:
--> When user tries to click picture through app ,i want to add another small rectangular view in which zoomed view is visible live while capturing image(which is seen by camera). Is it possible? I mean i have found that live streaming of camera is possible but that is in case of video.
I want to see zoomed view live when user moves camera.
Thanks in advance!

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.

Resources