Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8737375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:30:24+00:00 2026-06-13T10:30:24+00:00

I’m trying to implement my own Homography and Pose estimation in OpenCV. Suppose I

  • 0

I’m trying to implement my own Homography and Pose estimation in OpenCV. Suppose I have a square image as a model which I want to locate in input frame from camera.
My question is about how to prepare model data to calculate Homography.

I did the following procedure:

1-I extracted 3 corresponding set in both images.

 Input features:       Model Features:
p1_Input(278,278)---> p1_model(137,273)
p2_Input(317,235)---> p2_model(176,230)
p3_Input(217,204)---> p3_model(76,199)  //all in pixel

2- Solving P3P problem:

a) normalizing input points using camera Intrinsic parameters:

u.x=(p1_Input.x - cx) / fx 
u.y=(p1_Input.y - cy) / fy  
u.z=1

v.x=(p2_Input.x - cx) / fx 
v.y=(p2_Input.y - cy) / fy  
v.z=1

w.x=(p3_Input.x - cx) / fx 
w.y=(p3_Input.y - cy) / fy  
w.z=1

b) normalizing the lenght in order to have a unit vector:

d = sqrt(u.x*u.x + u.y*u.y + 1);
u.x=u.x/d;
u.y=u.y/d;
u.z=u.z/d;  // and same for v and w

c)Finding distance between u and camera focus.(same for v and w) by solving p3p and storing in a,b and c

d)computing 3D coordinates:

A_Input.x=a*u.x;
A_Input.y=a*u.y;
A_Input.z=a*u.z;  // same for B_input and C_Input

like:
A_Input:(-0.0899342 ,0.0570672 ,0.976046)
B_Input:(-0.0197703 ,-0.0194311 ,0.955101) 
C_Input:(-0.197233 ,-0.0746457 ,0.967379)

3-Computing Homography

My question is arising here. How should I prepare and modify p1_model,p2_model and p3_model to be prepared for Homography computing?

Obviously A_Input is 3D vector with normalized date while p1_model is 2D vector in pixel.

After solving the problem the rest would be as follows:

a)finding centeroid point for both set.

b)finding H using this formula dot prodoct

4- finding rigid transform using H and SVD

more detail is available here and here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:30:26+00:00Added an answer on June 13, 2026 at 10:30 am

    As far as coordinate systems go, there is no specific “format” that you need to put your points in to get good results from a P3P (or PnP) algorithm, just be consistent. The solution the algorithm is looking for given a correspondence between p1 and p2 is

    p2 = [resulting_3x4_transform]*p1;
    

    for each correspondence. It may be advisable for numerical reasons to not have any coordinate values be very large or very small but other than that, feel free to put your points in any coordinate system you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm trying to select an H1 element which is the second-child in its group
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.