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 - raehyuk

Pages: [1]
1
Python and Java API / Extracting time consumed for metashape running.
« on: October 16, 2019, 10:16:16 AM »
Hello

I am running metashape-pro with python scripting.

After aligning cameras I save the project.

This is the part of the code.
###################################
for frame in chunk.frames:
    # you can specify the degree of accuracy
    frame.matchPhotos(accuracy=Metashape.MediumAccuracy)
chunk.alignCameras()
doc.save(dir_to_be_saved+"/project.psz", chunks = [doc.chunk])
##################################

Is there any way to check the time consumed for aligning cameras?

Thank you in advance!

2
Python and Java API / Re: python scripting code for camera path estimation.
« on: September 25, 2019, 04:36:43 AM »
Yes it is.

They are ordered according to the timestamps (name of each image).


3
Python and Java API / python scripting code for camera path estimation.
« on: September 24, 2019, 09:08:23 AM »
Hello.

I have to extract camera path for a given sequence of photos.

I have 2 questions.

1) Does accuracy setting affect the accuracy of camera path? If so, which setting do you recommend (It would be best to set it to HighestAccuracy but it will take too much time)

2) Could you write very simple (it is okay if it is not fully functional) python script for computing path and saving it.

Thank you !

4
General / Specifying distance between two points.
« on: May 14, 2019, 06:12:59 AM »
Hello

I am constructing 3D model of broken pottery pieces.
My goal is to put the broken pieces together to recover its original shape.
In order to do so, I need to make sure that all the 3D models have same scale as each other.
I guess photoscan ( I am using professional) has a function of specifying distance between two points in the photo
so the program can use it as a ground truth dimension.
Could you let me know I can I set ground truth distance between two points in cameras?

5
Sorry alexey,

I am using photoscan-pro and matlab for rotating point cloud.

Here is my project in .PSZ
Link to google drive.

https://drive.google.com/file/d/13xxu80auSMp3L0bVpfYvQ9b6OB8oiapF/view?usp=sharing

I was not able to upload it in attachment because the file is too big.

6
Also, could you let me know how to change coordinate system?


7
Hello Alexey,
I asked the question like below

"""
Hi,

##Context##
I used PhotoScan for 3D reconstruction from a sequence of spherical images. I exported the reconstructed 3D model as a 3D point cloud (.ply file) and the estimated camera poses (.xml file). I open the 3D point cloud in MeshLab and it is not straight. Part of the reasons is that the 360-degree spherical camera that we used was hand-held (so not straight). In our case, we know the vertical direction of the first image (by manual interaction with an external software), and we can compute a rotation that can map this vertical direction to the up-direction [0,0,1]. (we know the vertical direction *only* of the first image). This vertical direction is a 3D vector u=(ux,uy,uz) in the camera coordinate system (z pointing up).

##Goal##
We would like to apply this rotation (or 3D transformation) to the exported 3D point cloud using Matlab so that the 3D point cloud becomes correctly oriented (should be straight/vertical). We tried several things (we are familiar with 3D points manipulation and 3D transformations) but none of them worked. The problem seems to be in the coordinate systems of the 3D point cloud and/or the spherical cameras. Any tips?


##What we tried##
Let R and T be the rotation and translation of the first image (from the estimated camera poses in the xml file). Let Rup our rotation matrix to straight up the direction.
We tried:
- directly applying Rup (and also its inverse) to the 3D point cloud
- We applied -T (to move the 3D point cloud to the origin) and applied our Rup (and its inverse)
- we also applied R^{-1} then Rup
- we also applied -T, then R^{-1} (so that the first image has its "default" orientation" and at the origin) and then Rup (and also its inverse)
- among other things
However the resulting 3D point cloud is not straight.

Side note: we checked this rotation and it is correct: by applying this rotation to the spherical image, we can obtain a new spherical image (and its equirectangular image) which is straight.
Modify message
"""

and this is your reply

"""
Hello raehyuk,

Can you share the sample project with only alignment results in PSZ format, so that we could try to modify the chunk's coordinate system according to the first camera orientation?

Were you trying to do that (according to the latter section in your post) in Matlab only or in PhotoScan / Metashape using Python?
"""

Sorry I missed your reply.
I rotate point cloud using matlab and I am using metashape-pro (not python scripting just using gui).
This is link to the .PSZ
https://drive.google.com/file/d/13xxu80auSMp3L0bVpfYvQ9b6OB8oiapF/view?usp=sharing


8
General / Setting the orientation (rotating) the exported 3D point cloud
« on: February 13, 2019, 11:05:58 AM »
Hi,

##Context##
I used PhotoScan for 3D reconstruction from a sequence of spherical images. I exported the reconstructed 3D model as a 3D point cloud (.ply file) and the estimated camera poses (.xml file). I open the 3D point cloud in MeshLab and it is not straight. Part of the reasons is that the 360-degree spherical camera that we used was hand-held (so not straight). In our case, we know the vertical direction of the first image (by manual interaction with an external software), and we can compute a rotation that can map this vertical direction to the up-direction [0,0,1]. (we know the vertical direction *only* of the first image). This vertical direction is a 3D vector u=(ux,uy,uz) in the camera coordinate system (z pointing up).

##Goal##
We would like to apply this rotation (or 3D transformation) to the exported 3D point cloud using Matlab so that the 3D point cloud becomes correctly oriented (should be straight/vertical). We tried several things (we are familiar with 3D points manipulation and 3D transformations) but none of them worked. The problem seems to be in the coordinate systems of the 3D point cloud and/or the spherical cameras. Any tips?


##What we tried##
Let R and T be the rotation and translation of the first image (from the estimated camera poses in the xml file). Let Rup our rotation matrix to straight up the direction.
We tried:
- directly applying Rup (and also its inverse) to the 3D point cloud
- We applied -T (to move the 3D point cloud to the origin) and applied our Rup (and its inverse)
- we also applied R^{-1} then Rup
- we also applied -T, then R^{-1} (so that the first image has its "default" orientation" and at the origin) and then Rup (and also its inverse)
- among other things
However the resulting 3D point cloud is not straight.

Side note: we checked this rotation and it is correct: by applying this rotation to the spherical image, we can obtain a new spherical image (and its equirectangular image) which is straight.

9
General / Inquiry about coordinate system and spherical image.
« on: February 13, 2019, 09:38:48 AM »
In  photoscan, where is the z vector of a spherical camera?
Does it point upwards, or downwards or "towards the scene?

Also  we have a gyroscope attached to our spherical camera. we know the gravity direction (in the camera coordinate system, z pointing downwards) of the first image from the gyroscope, i.e. v=(vx,vy,vz). How to make the 3D point cloud aligned with the gravity direction?


10
General / Re: Spherical image and real world coordinate
« on: February 11, 2019, 05:15:15 AM »
Hello Alexey,

I would like to tell you my situation in a more detailed way.

I have a spherical video. And I tilted the video with my code on purpose.

Let us say, I tilt the video upside down and perform 3D reconstruction with separate chunk.

How can I make both chunks share same coordinate system. (so that one point cloud is upside down version of the other)

Thank you!

11
General / Re: Spherical image and real world coordinate
« on: February 11, 2019, 04:47:08 AM »
Hello Alexey,

Thanks for your help.

My chunk is not referenced.

Then how can I leave reference for chunk and relation between camera coordinate system and real world coordinate system?


12
General / Spherical image and real world coordinate
« on: February 10, 2019, 05:49:03 PM »
Hello!

I would like to know relation between spherical image and real world coordinate.

I guessed that ground is parallel to xy plane but in reality it wasn't.

Since I have no background knowledge about 3D reconstruction, could you please give me some information

about coordinate system defined in photoscan?


Pages: [1]