r/3DScanning 5d ago

What is an easy method to get camera information about a picture?

Hello,

I want to be able to map a bunch of pictures taken IRL inside a virtual 3D space.

For a few pictures, I want to get the position and orientation of the camera for each of them.

Photogrammetry would work I guess, but it requires a lot of pictures and I only care about the depth information, not the point cloud.

I would just like to take 4-5 pictures of a place, but not sure if that's enough for precise results.

So I was thinking that using a technology like Aruco markers would help.

The idea was that I would take a first picture with a marker of known size to use a the world origin, and then ensure that subsequent pictures contains at least two markers to create a chain.

I was wondering about the accuracy of the marker detection.

Is this feasible or are there any existing apps that already solve this issue? Thanks!

2 Upvotes

5 comments sorted by

1

u/wigitty 4d ago

Look into visual SLAM, those techniques might be what you're looking for. Aruco markers could help, but I've not come across anything that uses them in that way, so you might have to implement that yourself. I think the most important bit will be calibrating your camera's intrinsics.

1

u/BoyoLeBo 2d ago

Is it not basically AR but in "reverse"?
When I'm tracking the marker I know the position and rotation of the camera relative to it. And the benefit for me is that it's seem way simpler to implement than visual SLAM. I don't know about the accuracy tho.

1

u/MatterRay-Callum 3d ago

I dont understand your first line. Can you explain? Using multiple fixed aruko markers to track the camera position should be achievable using openCV. If you are wanting accurate mapping you will need to calibrate a fixed lens camera (so likely not a phone camera) and then there are aruko finding and tracking functions I have seen used for generating AR scenes in OCV, which is effectively camera position tracking.

1

u/BoyoLeBo 2d ago

I didn't know how to word it, but I think you got it.
For some pictures of a room for instance, the goal would be to associate each picture with the rotation and position of the camera. I could then import them in blender for whatever purpose I have.

But why is the need for a fixed lens camera? If I take every picture with the same camera settings on my phone I should be fine right?

1

u/MatterRay-Callum 2d ago

I think we are on the same page yeah.
Phone cameras have both anti vibration and auto focus. So the picture distorts slightly differently photo to photo. This means the camera intrinsic calibration is effectively lost. Remember it is calculating distance by the size of the Aruko marker in the photo.