Forum

Author Topic: Camera Reference CSV Issues  (Read 2213 times)

jeffreyianwilson

  • Newbie
  • *
  • Posts: 28
  • Technical Director at Rendered.AI
    • View Profile
    • Portfolio Webpage
Camera Reference CSV Issues
« on: April 27, 2022, 05:37:42 PM »
Hello,

I have read other posts where MS cant find a correspondence of images with labels and tries to create a marker instead.  I have added the extension, disabled the preference to strip extensions and it still cannot find a corresponding image to field in CSV file.

I am running the latest build of Metashape

Jeff

Jeffrey Ian Wilson
Technical Director 3D
Rendered AI
www.rendered.ai

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14888
    • View Profile
Re: Camera Reference CSV Issues
« Reply #1 on: April 27, 2022, 06:11:57 PM »
Hello Jeffrey,

Can you please try to right-click on the first camera in the Photos pane, choose Show Info option from the context menu and check, if the image filename in the Path line corresponds to the value in the Label column in the CSV file being imported?
Best regards,
Alexey Pasumansky,
Agisoft LLC

jeffreyianwilson

  • Newbie
  • *
  • Posts: 28
  • Technical Director at Rendered.AI
    • View Profile
    • Portfolio Webpage
Re: Camera Reference CSV Issues
« Reply #2 on: April 27, 2022, 07:31:35 PM »
See image. CSV attached

Also is there a way to import quaternion rotation values?  I have an e57 with embedded panoramas (metashape wont import) so I extract an XML from metadata and convert to a CSV file.

This is Navvis VLX data

Jeff
Jeffrey Ian Wilson
Technical Director 3D
Rendered AI
www.rendered.ai

jeffreyianwilson

  • Newbie
  • *
  • Posts: 28
  • Technical Director at Rendered.AI
    • View Profile
    • Portfolio Webpage
Re: Camera Reference CSV Issues
« Reply #3 on: April 28, 2022, 06:29:48 PM »
See image. CSV attached

Also is there a way to import quaternion rotation values?  I have an e57 with embedded panoramas (metashape wont import) so I extract an XML from metadata and convert to a CSV file.

This is Navvis VLX data

Jeff

I found the error, the CSV entries from my python script were encapsulated by quote marks.
Jeffrey Ian Wilson
Technical Director 3D
Rendered AI
www.rendered.ai

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14888
    • View Profile
Re: Camera Reference CSV Issues
« Reply #4 on: April 28, 2022, 06:55:22 PM »
Hello Jeffrey,

Thank you for letting me know, that the issue has been resolved!

Please also check, that leading "space" symbol in CSV file doesn't affect the import process. As you may need to remove it from all the lines.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jeffreyianwilson

  • Newbie
  • *
  • Posts: 28
  • Technical Director at Rendered.AI
    • View Profile
    • Portfolio Webpage
Re: Camera Reference CSV Issues
« Reply #5 on: April 29, 2022, 04:27:10 PM »
Hello Jeffrey,

Thank you for letting me know, that the issue has been resolved!

Please also check, that leading "space" symbol in CSV file doesn't affect the import process. As you may need to remove it from all the lines.

What is the heading for a spherical image?  Is the left edge considered or the center of the panorama?  I am seeing a lot of error in reference panel.

I converted the quaternion to euler for python code which assumes all counterclockwise rotation to Metashape yaw as counterclockwise and roll/pitch as clockwise

# Convert a quaternion into euler counterclockwise angles in radians: roll(x), pitch(y), yaw(z)

def euler_from_quaternion(x, y, z, w):
        t0 = +2.0 * (w * x + y * z)
        t1 = +1.0 - 2.0 * (x * x + y * y)
        pitch_x = m.atan2(t0, t1)
     
        t2 = +2.0 * (w * y - z * x)
        t2 = +1.0 if t2 > +1.0 else t2
        t2 = -1.0 if t2 < -1.0 else t2
        roll_y = m.asin(t2)
     
        t3 = +2.0 * (w * z + x * y)
        t4 = +1.0 - 2.0 * (y * y + z * z)
        yaw_z = m.atan2(t3, t4)

        # Convert radians to degrees
        pitch_x=(m.degrees(pitch_x))*-1
        roll_y=(m.degrees(roll_y))*-1
        yaw_z=(m.degrees(yaw_z))
     
        return pitch_x, roll_y, yaw_z # in degrees
Jeffrey Ian Wilson
Technical Director 3D
Rendered AI
www.rendered.ai