0

I am currently projecting a circle with the camera.Camera class and different viewing angles.

Specifications:

  1. Circle center -> [0 , 0, 1]
  2. Camera center -> [0, 0, 0] (looking up the z-axis)

I used the camera.Camera class and it all seems fine, but when I change the viewing angle of the y-axis to a higher degree than 60, the points suddenly form a cross. (https://i.stack.imgur.com/GBvDX.png)

In my opinion, this is a code problem (it should form an ellipse). Or is this some projective phenomenon?

Here is my code:

cam = Camera()
cam.set_K_elements(0, 0, 1, a=1)
R = np.identity(3)
cam.set_R(R)
cam.set_t(np.array([[0], [0], [0]]))

rad_y = 1,0472
cam.set_R_euler_angles((0, rad_y, 0))
circle = get_circle_points(1000, 1)
cam.plot_world_points(circle, plot_style="ro", solve_visibility=False)

I am new to projective geometry, and I don't know if this behavior is expected or my fault.

I really appreciate any help you can provide.

Yunus Temurlenk
  • 2,826
  • 3
  • 10
  • 28
TecK97
  • 1
  • 1
  • The picture doesn't look like any projection a circle could possibly give. Maybe something goes wrong in get_circle_points()? – hasdrubal Mar 30 '21 at 07:14
  • Sorry, I can't post other pictures (I am new). But when I plot the circle with angle = 0 -> I get a good circle with a radius 1 ... if I increase the angle I get an ellipse (this is what I thought should happen). But with angle>50 I get this result and I don't know why. – TecK97 Mar 30 '21 at 07:17
  • But thank you for your answer, I will try to evaluate my function. – TecK97 Mar 30 '21 at 07:19
  • Could you try with `rad_y = 1.0472`, the comma version should not run at all as it gives `rad_y` an integer list as value. Could you give the library imports for the not-so-closely initiated? Is the setting of `R` to the identity not redundant, as you set a little later the matrix using Euler angles? Would it be better to sort the initialization sequence more intuitively, that is, set first the camera position, then the rest orientation, then change that via a look-at the target position? – Lutz Lehmann Mar 31 '21 at 13:36
  • Hi, thanks for your answer. This is just a small code snippet, and I calculate the radiants from degrees (radians(angle)). This is just a typo. Yeah, you are probably right to change the sequence. I did not find the issue yet. I think it has something todo with the rotation of the camera. If I set the solve_visibility to True it doesn't show anything and I don't know why. – TecK97 Apr 03 '21 at 08:15
  • It seems that the points form an ellipse with 40 degrees, but with more than 50 degrees the points show up on the other side of the plot... really strange Update: If I change the camera position on the z-axis to 0.5 instead of 0 it works perfectly ... – TecK97 Apr 03 '21 at 08:18

0 Answers0