I'm creating an augmented reality app which overlays a 3D logo on the iPhone's video camera view using cocos3d.
I need to record the video with the logo overlay and write this to a file.
What would be the best way to accomplish this?
Try to modify this project from apple: here. Add your logoimage in the viewDidLoad method of AVCamViewController. You'll need to clean the XIB from everything but the view.
Related
I've read few questions here on stack and I'm in a dead-end. I want to have device (iPhone/iPad) camera as a background, to one of my ViewControllers. I'm using Storyboard and UINavigationsViewController, so I'm modyfing a child ViewController. As far as I read, this means that I cannot force this "child" to start in specific orientation (first problem).
Secondly, I decided to go with UIImagePickerController, but as I got it right - you cannot rotate this component, right?
So basically my question is where to go from here, to achieve camera view on background no matter what device orientation? It surely can be done, because Vuforia i.e. has it (and they are using UIImagePickerController with EAGLView).
You have two options to do that task:
1) You can use Eaglview to render the frames of camera device in background.
2) You can use caeagllayer to do the same.
To draw on that layer you have to use drawableproperties and CaTransformationMatrix
I have been messing around with the AVFoundation framework for iPhone, but I can't seem to be able to get the information from the back video camera to display on an UIImageView I have in interface builder.
This is a single view application.
I just want to get what the back camera sees displayed on an UIImageView.
Thank you!
You don't need a UIImageView, just a UIView.
Take a look at AVCaptureSession and AVCaptureDeviceInput in AVFoundation. With these you can access the cameras.
AVCaptureVideoPreviewLayer can be used to draw the camera input to a UIView.
http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureVideoPreviewLayer_Class/Reference/Reference.html
Hopefully this answers your question: http://www.ios-developer.net/iphone-ipad-programmer/development/camera/camera-preview-on-a-view-controller
Please let me know if you would like any more information!
Is there a way presenting the camera interface not in full screen specially in the iPad?
I've tried the cameraOverlay but it still present the camera UI in full screen.
just add an additional view object to your nib/storyboard and use that as your camera interface.
I am working on camera application in which I want to set the screen of the camera i.e camera window appear for particular frame. And in front of camera screen the cut out image is coming so that user can see the background through the cut out part of the image and capture the image. So any one know to do this i.e. customization of UIImagePickerController.
UIImagePickerController has a property named cameraOverlayView. Use this to set your camera overlay as any view you like. Use normal view transparency for letting the user see parts of the live camera view.
In augmented reality app,on Camera view another transparent view will be, On this transparent view, we used for drawing on camera view and saving it, can you suggest (Start and end) me how to work with this application,
thanks you, have a great day
You'll want to use a UIImagePickerController to show the camera preview. Set its showsCameraControls property to no, so none of the standard photo-taking interface is visible. Now, UIImagePickerControllers have a nice little cameraOverlayView property that you can use to place any view you want over the camera preview. Depending on what precisely you want to augment your reality with, this view could be realized in different ways. For example, if you want to overlay 3D models over the camera preview, this view could be a transparent OpenGL ES context. If you don't need any 3D assets, it can be a regular transparent UIView on which you draw some custom graphics with Quartz. It's up to you, but you want the general pattern of:
UIImagePickerController with showsCameraControls = NO
set cameraOverlayView to some transparent view to render content
This is really a huge question, and there are tons of intricacies depending on the specifics of your design. This is just a general summary.