How to set focus of raspberry pi camera module V2? - raspberry-pi

When I searched about it on google and youtube I get this :
https://www.youtube.com/watch?v=u6VhRVH3Z6Y
In the video the focus of the camera is set physically by rotating lens of the camera but the lens of the camera is very sensitive, is there any other way to set the focus of camera module either by code or physically?
Thanks in advance

Related

Augmented Reality with Unity ARFoundation on mobile device front-facing camera

Does anyone know if the Unity library ARFoundation works with the front-facing camera on a mobile device? I am having trouble finding recent answers online
Thanks
You can go to the AR Camera -> AR Camera Manager and change the CameraFacingDirection to User.
Now the mobile will use the Front camera if the feature works with front camera. If not, it will enable the back camera.
Disclosure: Lot's of features like Image 2D Tracking and Body Tracking can't work with front camera :(

Unity: How to acces Android stereo back camera?

I want to get frames from back cameras at the same time (to compute the disparity map) on an Android smartphone, is there a way to do it?
I tried to get the list of a smartphone with 2 rear cameras and a front camera using ''WebCamTexture.devices" and it displays only two cameras: a back and a front camera. I then tried to display "WebCamDevice.depthCameraName" and I got nothing.
I know that there is a Depth API that provide depth image but I don't want to use it since it's based on a SLAM algorithm.
I appreciate your help, I'm still newbie in Unity.

Can you use the headset camera on the HTC Vive in Unity

I'm working in unity(2018) and building for the HTC Vive VR headset. I had an idea to use the small camera on the front of the headset to make an AR system, as in run the video from the headsets camera to the headset view to then be able to overlap things from a unity environment. But unfortunately, I can't seem to find any examples of others doing this (other than the Tron blue outline system that the Vive comes with) though perhaps I'm not looking with the right keywords.
If anyone has seen something like this or know if it can be done I'd greatly appreciate it.
It is registered as a standard WebCam, so you should be able to use Unitys WebCamTexture.
But the resolution of the cameras is very low.

How to change the AR Foundation Camera Rotation and position using joystick in Unity3d

I am creating a project like AR Portal in the AR foundation.
there are two modes in this:
AR Mode
Joystick Mode
Everything is going well with AR Camera and in AR mode.
In joystick mode, I am unable to rotate the camera and I am stuck on that problem and didn't find any solution.
If I disabled the Tracked pose Driver of AR Camera, then it will work but if I enable the Tracked Pose Driver, then it will not work.
Is it possible to rotate the camera when Tracked Pose Driver is enabled?
I'm not sure what you're trying to do there. AR camera is usually a physical camera, changing its position and rotation by code would not make a lot of sense. If you are using the joystick for a different scene/ part of the scene, try using a regular Unity camera and write a simple controller to move it around.

How to detect a circle using SteamVR SDK?

I am involved in a virtual-reality project using the HTC Vive device, Unity and the SteamVR SDK used to communicate with the Vive.
Thanks to the joysticks, the final user must draw some shapes (for example a circle) and the movements begin when he presses a joysticks' button.
From all the generated data (output from the joysticks), how could I detect a circle ?
Do you have some documentation on this ?
Please correct me if I understand your concern incorrectly here:
You use joysticks to draw some shapes like circles in some apps like steamvr home,
and you want to detect what you have drawn using software. And maybe you want to show the result in real time in screen or save to a file.
That means you need the ability to get rendered images, and detect image content using algorithms like deep learning.
HTC Vive device are compatible with openVR SDK:
https://github.com/ValveSoftware/openvr
You can use openVR SDK to DIY a steamVR driver,and get images in real time using direct mode component in the SDK. It has lot of works to do even before adding the detection algorithm, because you need a steamvr driver that can used to execute steamVR.