I making an augmented reality app and i need to take picture from camera and overlay 3d model over it.
I am already can take screenshot of gl view with 3d logo, but i can't figure out how to take image from camera.
How too take picture from camera?
I making an augmented reality app and i need to take picture from camera and overlay 3d model over it.
I am already can take screenshot of gl view with 3d logo, but i can't figure out how to take image from camera.
How too take picture from camera?
Copyright © 2021 Jogjafile Inc.
If you mean to display live video stream form camera you can use GPUImage.
If you only need to take a still image, use AVFoundation's AVCaptureStillImageOutput. See AVCam - Apple's sample code where you can strip the part of previewing live video (
AVCaptureVideoPreviewLayer) and just capture a still image when you need it.This code is used to take photo:
Hope it helps.