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

Pages: [1]
Hey Alexey,

thanks for the reply. The file contains numerical values, no formulas. The sin/cos/alpha were just mentioned in the post to clarify the principle. Sorry for the confusion.


Python and Java API / Re: Writing console log to text file
« on: March 06, 2018, 07:47:41 PM »
Hi Alex,

can't you just pipe the console output to a file using the terminal?

Like so:
./ -r -platform offscreen > file.log (on Linux)

Drawback is you don't see whats going on while the script is running. If you want to follow what is being written to the file open another terminal and execute:

tail -f file.log



we are using a stationary camera and a rotating plate in the field of view to image objects from all sides. Within the local coordinate system we know the distance from the camera to the object and we (roughly) know the rotational angle alpha between consecutive images. Hence we know the z coordinate - which never changes - and set it to 0 in the local coordinate system. The x and y coordinates are variable but can roughly be computed by sin(alpha) and cos(alpha) for the known rotation angle alpha between consecutive images. From the definition of the axes ( we also know that the yaw (rotation around z-axis / camera view direction) and the roll (rotation around x-axis) never changes and we also set these to 0.

We would like to guide the reconstruction process by setting appropriate reference values for the x,y,z and yaw,pitch,roll parameters as well as the accuracy values. We would like to use a CSV file. According to the Python API we create a CSV file like so:

n,       x,           y,           z,X,Y,Z,a,b,      c,A,B,C

So we assume that we know z perfectly (accuracy 0[m]), and x and y can have an error of 1[m]. And for the angles we set the accuracies of yaw and roll to 0[°] and the accuracy of the pitch to alpha [°] to allow for some uncertainty in the direction of rotation.

We load this file through the Python API by:
chunk.loadReference(file.csv, PhotoScan.ReferenceFormatCSV, 'nxyzXYZabcABC',',',True,1)

Unfortunately, the resulting camera poses after the estimation are often way off. They should form a perfect circle around the object, with overlap between the images. So probably something is wrong with how we set the references.


1) Are the given values for the accuracy parameters correct (X=Y=1 [m] and A=B=0 [°])?
2) Can PhotoScan handle such strange reference settings? After all the "plane" at one time appears to be flying upside down underneath the object.
3) Is this the correct way to load the reference values after all or should we follow jpvega's way ( - with modified parameter names: Chunk.accuracy_cameras -> Chunk.camera_location_accuracy)?
4) Is it possible at all to prevent PhotoScan from optimizing two rotational angles completely?
5) Are the absolute settings for the axes / angles correct or did we mess up the coordinate system?

Thanks for your help!

Pages: [1]