How to change the real-time video stream from the iPhone camera?

Every time the iPhone camera captures a new image, I want to change it and then display it on the iPhone screen. Another way: how to change the real-time video stream from the iPhone camera?
I need a method that is called every time a new image appears from the camera.

Thanks for your help!: -)

EDIT: what I want to do seems like augmented reality: while I am shooting a video, each image is resized and displayed in real time on the iPhone screen.

+4
source share
4 answers

You can capture the image using the UIImagePickerController takePicture method and draw a modified version of cameraOverlayView .

You get the image recorded as a result of the takePicture message from the UIImagePicker delegate in imagePickerController: didFinishPickingMediaWithInfo :. From the dictionary provided to this method, you can get the original image, which you modify and draw on the overlay.

Here is an example for using cameraOverlayView. You should be able to reuse the captured image from your delegate to draw your overlay view.

+1
source

Many augmented reality applications do not actually change the image, but simply overlay information based on what, in their opinion, is on the screen from the input from the accelerometer and compass. If this is the AR you want to do, try looking at ARKit .

+1
source

You cannot process camera image data in real time. There is no API for this. Send a request from Apple using your bug tracker. Many of us have already done this. More queries may make this possible.

0
source

Oh yes, just use the overlay. You talked about changing the video stream, which is clearly not necessary.

0
source

Source: https://habr.com/ru/post/1302524/


All Articles