Forum

Author Topic: camera.center is too high relative to center of image  (Read 295 times)

sepehr500

  • Newbie
  • *
  • Posts: 17
    • View Profile
camera.center is too high relative to center of image
« on: July 29, 2022, 03:03:00 AM »
Hello. I am trying to get the center coordinates for each camera, but when I plot out the coordinates, what Metashape thinks is the center of the camera is higher than the actual center of the image. All I am currently doing to get the coordinates is

Code: [Select]
chunk.crs.project(chunk.transform.matrix.mulp(camera.center))

Is there an additional adjustment that needs to be made?

Paulo

  • Hero Member
  • *****
  • Posts: 1024
    • View Profile
Re: camera.center is too high relative to center of image
« Reply #1 on: July 29, 2022, 11:29:58 AM »
Hi sepehr500,

could you explain what you mean by actual center of the image?

What you are printing out are camera adjusted or estimated perspective center coordinates in chunk crs....i.e. point where all rays pass thru when going from ground to camera sensor...somewhere in the middle of the lens
« Last Edit: July 29, 2022, 12:21:21 PM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

sepehr500

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: camera.center is too high relative to center of image
« Reply #2 on: July 29, 2022, 07:01:42 PM »
Thanks for the response. To be more specific, I am dealing with a 360 camera. By center of the image, I mean where the horizon is when the camera is level. I would expect the Y axis camera.center to give me the center of the camera horizon, but instead, it is higher than were it should be by a little bit.

Paulo

  • Hero Member
  • *****
  • Posts: 1024
    • View Profile
Re: camera.center is too high relative to center of image
« Reply #3 on: July 29, 2022, 07:05:29 PM »
Ok, I understand a little better... Could you show the estimated position and rotation of specific camera (yaw, pitch, roll)?

If the estimated pitch of your spherical (360) image is less than 90 deg, then the projected Image Center onto model will be lower than camera center.. see attached... 

« Last Edit: July 29, 2022, 07:32:10 PM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

sepehr500

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: camera.center is too high relative to center of image
« Reply #4 on: July 30, 2022, 12:13:04 AM »
I think you may be right about pitch being slightly off from 90 deg. Any ideas for how to adjust for the center point being slightly off because of this?

Paulo

  • Hero Member
  • *****
  • Posts: 1024
    • View Profile
Re: camera.center is too high relative to center of image
« Reply #5 on: July 30, 2022, 12:04:59 PM »
sepher,

i do not see why you say the image center point being slightly off. If the image CP (pixel coordinates = (w/2, h/2) where w is width and h is height of image in pixels) is projected slightly off from horizon (pitch 90) then maybe that is the reality of your pose....after adjustment....
Best Regards,

Paul Pelletier,
Surveyor