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

Pages: [1]
1
Python and Java API / Re: Import markers from multiple files
« on: April 22, 2020, 02:49:06 PM »
Hi Alexey,

Could you manage to download and test the data?

I am stuck with my project at the moment and would not want to redo allot of work.

Thank you for the help.

3
Python and Java API / Re: Import markers from multiple files
« on: April 20, 2020, 04:19:03 PM »
Thanks for responding.

There are no duplicate markers in the files.

I saved a few copies of the same project and had different people pick control to cut down on time. I deleted sections of the control file to make sure the same marker is not picked by 2 people.

I did not realise I cannot import multiple marker files back into one project afterwards.

So i exported all the markers from the different projects into XML files.

You can download 2 sample files below:

https://wetransfer.com/downloads/4d7a7479e7a0ac8958824b8a573da88a20200420131642/af7b96e26e630a10bfea490b5ba8b23320200420131711/5c9839

Much appreciated



4
Python and Java API / Re: Import markers from multiple files
« on: April 20, 2020, 11:17:35 AM »
Good morning,

I have the same problem and would like to use your script in metashape version 1.62 but cant get it working.

Did you Mrblonde8888 perhaps update the script to work with the new Metashape?

I am getting the below error when trying to run the script.

2020-04-20 10:54:56     xml_markers_proj = xml.childNodes[0].childNodes[1].childNodes[7].childNodes[1].childNodes[1]
2020-04-20 10:54:56 IndexError: list index out of range
2020-04-20 10:54:56 Error: list index out of range

Thank you

5
Bug Reports / MatchPhotos.prematch: Invalid data type
« on: November 08, 2019, 08:26:30 AM »
Good day,

I am trying to match some images using the network processing.

I am getting the following error in each line of the log:
2019-11-08 07:21:17 [10.0.3.147:57321] failed #0 MatchPhotos.prematch (64/100): Invalid data type
2019-11-08 07:22:28 [10.0.3.147:57321] failed #0 MatchPhotos.prematch (65/100): Invalid data type
2019-11-08 07:23:38 [10.0.3.147:57321] failed #0 MatchPhotos.prematch (68/100): Invalid data type

What could be causing this problem?

Thanks

6
Bug Reports / Re: Dual GPU Geforce GTX 1080 Constantly Crashing 1.4.2
« on: June 08, 2018, 09:49:08 AM »
Good day,

I have a similar problem. Yesterday I installed a 1080Ti with the previous 970. Agi would not process using both cards:

2018-06-08 08:44:42 Agisoft PhotoScan Professional Version: 1.4.2 build 6205 (64 bit)
2018-06-08 08:44:42 Platform: Windows
2018-06-08 08:44:42 CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (desktop)
2018-06-08 08:44:42 CPU family: 6 model: 60 signature: 306C3h
2018-06-08 08:44:42 RAM: 31.9 GB
2018-06-08 08:44:42 OpenGL Vendor: NVIDIA Corporation
2018-06-08 08:44:42 OpenGL Renderer: GeForce GTX 1080 Ti/PCIe/SSE2
2018-06-08 08:44:42 OpenGL Version: 4.6.0 NVIDIA 398.11
2018-06-08 08:44:42 Maximum Texture Size: 32768
2018-06-08 08:44:42 Quad Buffered Stereo: not enabled
2018-06-08 08:44:42 ARB_vertex_buffer_object: supported
2018-06-08 08:44:42 ARB_texture_non_power_of_two: supported
2018-06-08 08:44:42 Using simple console. Rich console can be enabled in Preferences dialog.
2018-06-08 08:44:54 Loading photos...
2018-06-08 08:44:54 Finished processing in 0.016 sec (exit code 1)
2018-06-08 08:45:33 AlignPhotos: accuracy = Medium, preselection = reference, keypoint limit = 40000, tiepoint limit = 4000, apply masks = 0, filter tie points = 0, adaptive fitting = 0
2018-06-08 08:45:33 Matching photos...
2018-06-08 08:45:33 Detecting points...
2018-06-08 08:45:33 Using device: GeForce GTX 1080 Ti, 28 compute units, 11264 MB global memory, compute capability 6.1
2018-06-08 08:45:33   driver version: 9020, runtime version: 5050
2018-06-08 08:45:33   max work group size 1024
2018-06-08 08:45:33   max work item sizes [1024, 1024, 64]
2018-06-08 08:45:33 Using device: GeForce GTX 970, 13 compute units, 4096 MB global memory, compute capability 5.2
2018-06-08 08:45:33   driver version: 9020, runtime version: 5050
2018-06-08 08:45:33   max work group size 1024
2018-06-08 08:45:33   max work item sizes [1024, 1024, 64]
2018-06-08 08:45:33 [GPU] photo 1: 19627 points
2018-06-08 08:45:37 Warning: cudaStreamDestroy failed: out of memory (2)
2018-06-08 08:45:37 Finished processing in 4.33 sec (exit code 0)
2018-06-08 08:45:37 Error: CUDA_ERROR_OUT_OF_MEMORY (2) at line 123

It works when selecting each card individually, they wont work together.

Thanks in advance.

7
General / Import Cameras - Issues
« on: February 24, 2018, 12:44:00 AM »
Good day,

I am importing cameras from external sources using the import camera function.

I am using bingo.dat format.

Below is the file content:

*   <____Photo_ID__><___Easting__><__Northing__><__Height_><___Phi__><__Omega_><__Kappa_><____Camera_ID_>
ORIA    07044634.jpg    374281.163    863977.346   1036.290    3.1500    0.1307   -3.0353         S000000
ORIA    07045014.jpg    374476.399    873007.337   1054.190    0.0515   -2.2880  121.6280         S000000
ORIA    07045017.jpg    374302.955    872910.869   1052.826    3.8781   -0.6670  120.1826         S000000

Also the camera information in bingo.dat

file_version: 1

begin gridgroup "Image deformation grids"
    enabled:     yes
    order_index: 0
    camera_name: "iXU1000-R (50mm)"
    description: "Calibration grid"

    begin grid "Image deformation grid 1"
        enabled:       yes
        inverse_scale: 1.000000
        columns:          27
        rows:             21
        description:   " "

        begin gridpoints
               -26.3040    -20.2381    -26.0000    -20.0000
               -24.2631    -20.2235    -24.0000    -20.0000
               -22.2250    -20.2087    -22.0000    -20.0000
               -20.1899    -20.1942    -20.0000    -20.0000
               -18.1582    -20.1801    -18.0000    -20.0000
               -16.1298    -20.1667    -16.0000    -20.0000
               -14.1048    -20.1543    -14.0000    -20.0000
               -12.0829    -20.1431    -12.0000    -20.0000
               -10.0640    -20.1333    -10.0000    -20.0000
                -8.0476    -20.1250     -8.0000    -20.0000
                -6.0334    -20.1185     -6.0000    -20.0000
                -4.0209    -20.1137     -4.0000    -20.0000

When I am done importing, I import the orientation details into the reference pane also.

For some reason the orientations give large errors on the reference pane. (See screenshot)

Why is this happening?

After I import cameras, I import an mesh and produce an orthomosaic with planer XY projection. With the current state of affairs I see large mismatches on the seamlines as photoscan has changed the exteriors somehow.

Thank you in advance for your help.

8
Python and Java API / Generate camera transformation matrix from OPK data
« on: February 24, 2018, 12:20:08 AM »
I am trying to get the below script working to use either the loaded OPK information in the reference tab or load from an external file. The script should function as import cameras function.

This will allow exterior orientations to be assigned to the cameras and Photoscan image alignment will not be needed.

The exteriors needs to be assigned to a specific chunk only.

The idea is to use exterior orientations from a (Image X Y Z Omega Phi Kappa) file and assign them to a specific chunk of photos. I do not want to align the photos with Photoscan.

Your help will be greatly appreciated.

Could you please provide a full script?
I managed to add at the beginning:
import math, PhotoScan

doc = PhotoScan.app.document
chunk = doc.chunk

but there is still problem with line 16:
sina = math.sin(0 - omega)
2016-04-11 12:08:39 NameError: name 'omega' is not defined

 


Hello dellagiu,

Using the following script you should be able to generate camera transformation matrix from OPK data:


Code: [Select]
import math, PhotoScan

#omega, phi, kappa - in radians
#X, Y, Z - coordinate information about camera position in units of the corresponding coordinate system


T = chunk.transform.matrix
v_t = T * PhotoScan.Vector( [0, 0, 0, 1] )
v_t.size = 3
m = chunk.crs.localframe(v_t)
m = m * T
s = math.sqrt(m[0, 0] **2 + m[0,1] **2 + m[0,2] **2) #scale factor

sina = math.sin(0 - omega)
cosa = math.cos(0 - omega)
Rx = PhotoScan.Matrix([[1, 0, 0], [0, cosa, -sina], [0, sina, cosa]])
sina = math.sin(0 - phi)
cosa = math.cos(0 - phi)
Ry = PhotoScan.Matrix([[cosa, 0, sina], [0, 1, 0], [-sina, 0, cosa]])
sina = math.sin(0 - kappa)
cosa = math.cos(0 - kappa)
Rz = PhotoScan.Matrix([[cosa, -sina, 0], [sina, cosa, 0], [0, 0, 1]])
 

t = PhotoScan.Vector([X, Y, Z])
t = chunk.crs.unproject(t)

m = chunk.crs.localframe(t)
m = PhotoScan.Matrix([ [m[0,0], m[0,1], m[0,2]], [m[1,0], m[1,1], m[1,2]], [m[2,0], m[2,1], m[2,2]] ])


R = m.inv() * (Rz * Ry * Rx).t()  * PhotoScan.Matrix().diag([1, -1, -1])

Tr = PhotoScan.Matrix([ [R[0,0], R[0,1], R[0,2], t.x], [R[1,0], R[1,1], R[1,2], t.y], [R[2,0], R[2,1], R[2,2], t.z], [0, 0, 0, 1]])

camera.transform = chunk.transform.matrix.inv() * Tr * (1. / s)

Pages: [1]