Accessing truedepth camera on Browser - ios

Is there any way of accessing truedepth camera of iPhones on the browser and using it?
I have checked webkitjs documentation, but they don't have anything related to this

Related

Can Apple's cinematic mode video camera be accessed via the AVfoundations api?

i'm building a camera application and I am trying to figure out if the cinematic mode camera found on the iphone 13 and 14 can be accessed via AVfoundations api?
https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app
Cinematic Mode is software Apple built for their cameras, but not a Camera itself.
To get a camera you want, you can use AVCaptureDevice.default(_for:position:) method.
More info here: https://developer.apple.com/documentation/avfoundation/avcapturedevice

Streaming from ip camera

I am working on 1 project start up. And i want to do the following this. 1)Detect the camera by wifi and camera id. 2)After detecting the camera.Fetch the stream from the camera to the phone 3)play that stream into the player.
Now i had done google and found that by RTSP we can achieve the following this. But i am not sure or dont have the code to detect the camera from the camera id or by wifi and the detect the stream from that. Can anyone guide me in this with the some sample source code.
If your camera supports ONVIF you can use it to detect it.

Stock iOS camera app seems to have wider field of view

I'm working on a video app for iOS, and everything seems to work fine other than if we go into stock iPhone camera app the field of view seems wider. I've tried playing with the different AVCaptureVideoPreviewLayer gravity settings (AVLayerVideoGravityResize, AVLayerVideoGravityResizeAspect and AVLayerVideoGravityResizeAspectFill) to no avail.
In fact, using other camera apps (like when taking a photo in Facebook) we get a much more similar output than we do with the stock camera app.
Does anyone have any information on why something like this might be? I've been scouring the internet and haven't been able to find anything.
It turns out the resolution of the still image camera is different then the resolution of the video camera, see for instance https://discussions.apple.com/thread/3490649?tstart=0

Opencv cant access camera connected through video capture device

I have a analog camera connected to EasyCap video capture device. When I run a basic code which opens webcam video using OPENCV, I can access my in-built webcam but not the other analog camera.
How would you connect any other camera (FPV, IR, etc) to the PC such that OPENCV can access it.
Thanks.
i struggled with the same problem and hope it helps!
the original thread + ANSWER
also relevant XKCD
one more observation: from your description it looks like you already have a webcam running on the laptop (in-built webcam maybe?) you might want to disable it in system manager so as to guarantee that your analog camera cam_index is zero for certain. Otherwise if you leave the webcam enabled as a device, then your analog cam will most likely be incremented to cam_index=1 which amusingly enough seems to be confirmed by it crashing on cam_index=1.
Arguable not a great method to find your camera's index but there you have it!
You can set which camera to connect to open by changing the following deviceID to the desired device you want:
CvCapture* capture = cvCaptureFromCAM(deviceID);
or new API:
VideoCapture cap(deviceID);
Check out documenation for more info.
Use the deviceID of the analog camera instead of the in-built one.

AV Foundation camera preview layer gets zoomed in, how to zoom out?

The application currently I am using has a main functionality to scan QR/Bar codes continuously using Zxing library (http://code.google.com/p/zxing/). For continuous frame capturing I used to initialize the AVCaptureSession and AVCaptureVideoOutput, AVCaptureVideoPreviewLayer described in the apple Q&A http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html.
My problem is, when I used to run the camera preview, the image I can see through the Video device is much larger (1.5x) than the image we can see through the still camera of the iPhone. Our customer needs to hold the iPhone around 5cm distance from the bar code when he is scanning, but if you hold the iPhone to that parameter, the whole QR code won't be visible and the decoding fails.
Why is Video camera in iPhone 4 enlarges the image (by seeing through the AVCaptureVideoPreviewLayer) ?.
This is a function of the AVCaptureSession video preset, accessible by using the .sessionPreset property. For example, after configuring your captureSession, but before starting it, you would add
captureSession.sessionPreset = AVCaptureSessionPresetPhoto;
See the documentation here:
iOS Reference Document
The default preset for video is 1280x720 (I think) which is a lower resolution than the max supported by the camera. By using the "Photo" preset, you're getting the raw camera data.
You see the same behaviour with the built-in iPhone Camera app. Switch between still and video capture modes and you'll notice that the default zoom level changes. You see a wider view in still mode, whereas video mode zooms in a bit.
My guess is that continuous video capture needs to use a smaller area of the camera sensor to work optimally. If it used the whole sensor perhaps the system couldn't sustain 30 fps. Using a smaller area of the sensor gives the effect of "zooming in" to the scene.
I am answering my own question again. This was not answered even in Apple Dev forum, therefore I directly filed a technical support request from Apple and they have replied that this is a known issue and will be fixed and released with a future version. So there is nothing we can do more than waiting and see.

Resources