Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sepehr500

Pages: [1] 2
1
Python and Java API / Disable Logging when running scripts
« on: September 22, 2022, 03:18:43 AM »
Hello. We are finding the logging is making a ton of noise when running scripts. Is there a way to disable logging when running metashape not using the UI?

2
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?

3
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.

4
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?

5
Works perfectly! Thank you.

6
Thanks Alexy. I figured out that i'm actually having a different scaling issue. updateTransform works well after adding scalebars programmatically, aftwords, when I go to align the 3d model to the location of the first camera, the scale gets reset.

Code: [Select]
    if not chunk:
        print("Empty project, script aborted")
        return

    T = chunk.transform.matrix
    origin = (-1) * camera.center
    R = Metashape.Matrix().Rotation(camera.transform.rotation()
                                    * Metashape.Matrix().Diag([1, -1, 1]))
    origin = R.inv().mulp(origin)
    chunk.transform.matrix = Metashape.Matrix([[1, 0, 0, 0], [0, 0, 1, 0], [
                                              0, 1, 0, 0], [0, 0, 0, 1]]) * Metashape.Matrix().Translation(origin) * R.inv()

If I go and scale model alignment after running the above script, then 0,0,0 is no longer then location of the first camera. Do you have any solutions for this?

7
What do you mean by checked?

8
Python and Java API / Replicate Update Transform using Python API
« on: May 20, 2022, 05:37:25 PM »
Hello. I am running a script where I detect markers, add scale bars, then try to scale the model to those scale bars. Unfortunately,  when I call chunk.updateTransform() after these scalebars are added programatically, nothing happens. But if I open the software, my scalebars and markers look great. All I need to do is click the update transform button in the GUI and the model scales. Is replicating this behavior in the API more complex than simply calling chunk.updateTransform()?

9
General / Make texture model only visible from one side
« on: May 05, 2022, 10:56:39 PM »
Hello. I am trying to create a textured 3d model of the inside of a house.  It work great, but the textures are projected on the both sides of the surfaces, making it so only first person views make sense. Is there a way to make textures only be visible on the side they are captured on? This would allow for a nice dollhouse view of the home.

10
Worked perfectly! Just as a heads up sounds there is a typo min(list(s*chunk.region)/2 and missing region.size. Thank you!

11
I am trying to create a cylindrical orthomosaic along the z axis. This works great when I do it the UI. "Build orthomosaic" -> "Cylindrical" -> "Cylinder Orientation = z". But I can't figure out how to do this with the Python API. My model is already oriented the right way, so all I need is to emulate this behavior in the API. Any ideas?

12
General / Re: 360 Animation or Image generation of 3d Model
« on: April 01, 2022, 06:36:28 PM »
This is perfect! Thank you!

13
General / 360 Animation or Image generation of 3d Model
« on: April 01, 2022, 06:49:00 AM »
Hello. I am trying to generate panoramic video of my 3D model so a user can pan around while looking at the video. I know Metashape can do a regular video recording, but can it do a 360 video recording (equirectangular)? If this isn't possible, is there a way to get a 360 image using renderImage in the python API?

14
General / Re: Multi-camera rig vs. Station
« on: March 24, 2022, 07:05:35 AM »
Thanks Paul. Thanks for posting that configuration. I will give it a shot and let you know how it goes!

15
General / Re: Multi-camera rig vs. Station
« on: March 23, 2022, 08:18:20 PM »
Thank you for the responses! My mistake for being unclear with my situation. The 4 cameras are facing away from eachother around the same point. Does this change the recommendations?

Pages: [1] 2