Jump to content

Trigonometry question - i guess it's easy


Recommended Posts

Hey guys,

 

i am giving up on this problem for today...can someone please point me to the correct trigonometric functions to use if i want to find the RED point in the attached screenshot?

 

i do know the positions of all three GREEN points and also the two GREEN angles around the RED point that i am looking for.

EDIT: The GREEN points are NOT on a circle around RED even if this screenshot might look like this is the case.

 

The background of this question is to find the position of the camera which shot an hdr on a set filmset where i also have lidar data. I can do it by hand to some extend but I want to solve this problem properly once and for all...i hope you are able to help me out!

 

thx in advance

Oli

post-4341-0-60608900-1403214939_thumb.pn

Edited by Oliver Markowski
Link to comment
Share on other sites

I would use the formula of the Al Kashi theorem. It's a litlle late to expose it here but I suggest you google it and you'll find it really easily.

 

It the general case used to calculate any angle cosinus in any kind of triangle of the well known formula used in a rectangular triangle :  cos(A) = adjacent side / hypothenuse

 

 

because you already know the angle you just need to get the sides of the triangle you're considering. And because those sides are calculated using the position of the green and red dot you will be able to figure out the position of the red one.

 

I link you the page of the formula with a good picture (sorry it's french - I can't get you the english one )

 

c² = a² + b² -2ab*cos(gamma)

 

Maybe a bit hard but I think that's how I would do it.

 

 

Hope this helps

Edited by Pilou
Link to comment
Share on other sites

Hey Pilou,

 

thx for getting me back on track....of course i know the law of cosines, but i thought i do not know the edge lengths. but acttually i can substitute the edgelength with another formula which is only missing my RED point...

 

sometimes you just need a break to re-organize your thoughts...thx again and stay tuned for updates - or another question :)

 

cheers

Oli

Link to comment
Share on other sites

I'd love to know how you went to the bottom of it :)

I'm on it, but solving all the equations is kind of hard...i guess i need to get my head around Octave/Scilab first, which might take some time...

I'll make the solution of this publicly available anyway...if I find one ;)

 

cheers

Oli

Link to comment
Share on other sites

  • 3 weeks later...

c² = a² + b² -2ab*cos(gamma)

 

Maybe a bit hard but I think that's how I would do it.

 

If you just use that naively, then you end up with 2 equations (cosine laws) and 3 unknowns (the lengths of the red line segments). So you need something other piece of knowledge to deduce those lengths. I don't know what that 3rd piece of info though but I'm probably missing something.

 

EDIT: Probably use the fact that the red lines intersect.

Link to comment
Share on other sites

  • 4 weeks later...

I think you're right Edward. 

 

Knowing that the three sides intersect, it could be nice to find the equation of the three straights lines. And you can pose another equation : A - B = 0, B - C = 0 and A - C = 0 with A B and C the equation of the three red straight lines. the only solution of this equation system will give you the intesect point which in that case, is the red point. something like that. I'll think about it on paper. I think it's a better option than al kashi theorem.

 

Just a rough thought. but good point Edward, indeed.

 

I'm wondering Oliver, if you're still here, do all points are in the same plane ? If it's the case then you can get a third equation with an angle which is the sum of the two former angles. The left and right green dot and the red one will give you the triangle. 

Edited by Pilou
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 3 months later...

hey guys,

 

just a quick follow up on this! I haven't found a resolution for this myself, but there are a lot of tools out there that already do this. My current favourite is the Nuke ProjectionSolver (NukeX only), but I am evaluating other tools as well at the moment...

 

basically it's all here already http://docs.opencv.org/trunk/modules/reg/doc/registration.html

 

Have fun!

Oli

Edited by Oliver Markowski
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...