Camera Matching Algorithm

I am trying to understand how camera matching (or match moving) works. I need to build a program that can move the camera in a way to match a 3D object to its projection on an image. For eg. if I had an image of a cube at some angle, the virtual camera must be moved in such a way that the points/vertices of the 3D cube match up with those in the image.

The inputs would be the image and the points on the image that correspond to each vertex of the the object (cube in the above example).

What is the approach I must take? Is there any algorithm that can help?

EDIT:

This is what I have figured out so far.

So this equation gives the relation between the world coordinates and the image coordinates of a point.

enter image description here

This can be expressed as Xc = R * Xs + T where R represents the rotation of the camera and T represents the translation.

Assuming the user points out which points belong where on the image, I need to compute the R and T matrices now.

I came across the Tsai Calibration Algorithm Which does solve this algorithm at some point. But as you can guess by the name, the algorithm is not designed for camera matching. Also, I don’t have a very strong background in math so I need to figure out how to solve this equation. To make things harder the transition from world coordinates to image coordinates must also be figured out.

I need help with somehow modifying this algorithm for camera matching and in solving the mentioned equation.

Please mention any other methods you know of. I do not need to stick to this particular method.

EDIT 2: For anyone who needs more information on camera matching: http://en.wikipedia.org/wiki/Match_moving

But basically the idea is to try and find the location and orientation of the camera from which the actual image must have been taken. Let say I have an image of a Rubik’s cube which shows the red and green sides. I also have a 3d model of the Rubik’s cube. Now I need to find the location and orientation of the camera such that if I take a picture of the 3d model now then it would look exactly like the image with the red and green sides visible.

Add access to the macbook camera for the terminal application

I am trying to run a OpenCV tutorial that uses the cv.VideoCapture(0). This does require permission from terminal to access the camera. Here is a blog description showing that they see the terminal app included in the Applications list:

enter image description here

But for me the Terminal is not provided as an optional App:

enter image description here

That is actually not at all surprising. But then how to add Terminal? The apple docs only show this: https://support.apple.com/guide/mac-help/control-access-to-your-camera-on-mac-mchlf6d108da/mac :

enter image description here

No mention of how to add other apps is included. So how to add Terminal? (Actually I would also be interested in adding for iTerm2 ..)

Can’t access main camera (stuck in wide angle)

My Zenfone 4 Max camera app is stuck on the wide angle camera. The icon on the picture below says it’s the main camera, but it’s possible to see by the curve on my wall that it’s indeed in wide angle. When I click on the wide angle icon, system says it’s now on wide angle, but the image doesn’t change.

I have tried restarting in safe mode, clearing app’s cache, restarting normally and tried using 3rd party camera apps. No success so far.

Any way to fix this without having to take it to Asus tech support (they take forever to answer) and/or restoring factory settings?

enter image description here

Programmatically grant new versions of my application access to camera and microphone

I have remote machines running my software. I have full control with MDM. I run a video conference application and need access to the camera and microphone.

Every time I push a new version of the software I have to manually approve access to the webcam. Is there something I can do in my install script (maybe with defaults write) to allow access to the webcam?

looking for camera support

I have a “It” film scanner camera (ITNS-500, model scnd503T1231), it shows up as a scanner, but I cant get it to communicate. in dmesg:

[23173.912666] usb 3-3: New USB device found, idVendor=05a9, idProduct=35c1, bcdDevice= 1.00 [23173.912669] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [23173.912670] usb 3-3: Product: Film and Photo Scanner [23173.912672] usb 3-3: Manufacturer: FW-OV550_09.12.15.1 

How can I get images out of this device?

Dell inspiron n5110 + Ubuntu 18.04. camera not recognised


Cheese and Skype not recognising my camera.

I did the ‘lsusb’

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0cf3:3005 Atheros Communications, Inc. AR3011 Bluetooth Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub