Giter VIP home page Giter VIP logo

Comments (6)

mkocabas avatar mkocabas commented on May 20, 2024

Hi @kallivad,

You can check this projection function:

def perspective_projection(points, rotation, translation,

For a sample usage, check this:

projected_joints = perspective_projection(model_joints, rotation, camera_t,

from vibe.

mkocabas avatar mkocabas commented on May 20, 2024

I am closing it now, feel free to ask if you need help about it.

from vibe.

cbsudux avatar cbsudux commented on May 20, 2024

Hey! I'm trying to get 2D pose from VIBE Output. How do I use the perspective projection function to do this? What inputs should I pass?

from vibe.

RainkLH avatar RainkLH commented on May 20, 2024

Same question.
For function "perspective_projection(points, rotation, translation,focal_length, camera_center)"
How to calculate Camera rotation、Camera translation、Focal length、Camera center

from vibe.

tegusi avatar tegusi commented on May 20, 2024

For classical intrinsic and extrinsic matrix, the following solution works well.

cam = dicts['orig_cam']
cam_s = cam[0:1]
cam_pos = cam[2:]
flength = w / 2.
tz = flength / (0.5 * w * cam_s)
trans = -np.hstack([cam_pos, tz])
camera_data['color_focal_length'].append(np.array([w / 2, w / 2]))
camera_data['color_center'].append(np.array([[w / 2, h / 2]]))
camera_data['c2w'].append(np.eye(4))
camera_data['c2w'][:3,3] = trans

from vibe.

lvZic avatar lvZic commented on May 20, 2024

For classical intrinsic and extrinsic matrix, the following solution works well.

cam = dicts['orig_cam']
cam_s = cam[0:1]
cam_pos = cam[2:]
flength = w / 2.
tz = flength / (0.5 * w * cam_s)
trans = -np.hstack([cam_pos, tz])
camera_data['color_focal_length'].append(np.array([w / 2, w / 2]))
camera_data['color_center'].append(np.array([[w / 2, h / 2]]))
camera_data['c2w'].append(np.eye(4))
camera_data['c2w'][:3,3] = trans

I found the cam params converge worse, and i use weak perspective in my code, in which kpy_2d = scale(kyp3d[, :2] + txy ). I think the key reason is the focal length of the dataset is different with each image, and it range from 400 mm to 800 mm. So maybe the network cannot regress the scale well?
As "It is common to assume a fixed focal length to perform perspective projection. " . I wonder if the performance would be improved if i use perspective projection instead of weak perspective?

from vibe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.