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

Pages: [1] 2
1
Python and Java API / Duplicate DEM
« on: November 08, 2019, 01:08:34 PM »
Hello,

How to duplicate DEM using python api? I want to make this section of metashape instruction automatically:

Quote
In case you want to save current DEM instance and edit its copy, right-click on
DEM and choose "Duplicate" option.

I've tried appending existing elevation model to the list of chunk elevations models, but it hasn't worked.

Code: [Select]
dem=chunk.elevation
chunk.elevations.append(dem)


2
Dear Alexey,

I've performed additional tests after i've copied image files to the local disk.

I've achieved following results:

2x GPU   - depth maps generation ~~ 14h , point cloud generation ~~ 5h

1x GPU (first GPU enabled only) - depth maps generation ~~ 14h , point cloud generation ~~ 7h

1x GPU (second GPU enabled only) - depth maps generation ~~ 13h , point cloud generation ~~ 6h. Thanks to that, i wanted to rule out the impact of GPU  failure.

As you can see, I expected some other results in case of both GPU enabled ;) any advice?

Best regards,
Adam

3
Thank you for a quick response.

Yes, "enable CPU" flag was disabled and "fine-level task subdivision" option was enabled for both runs.

Project was present on the local disk, but the images were on the network disk. At this moment, i'm copying files to the local disk and i will perform some additional tests.

Best regards,
Adam

4
Dear Alexey,

I've performed some new tests and i've received very strange results.

My test project contains about 3000 photos (20 MP, aerial photos with typical photogrammetric overlaps).

When i disabled one of GPU, processing time was shorter than when Metashape used two GPUs. Difference is noticable - depth map generation step ~ 10h (one GPU) / 18h (both GPUs)  and point cloud generation step ~ 4h (one GPU) / 5.5h (both GPUs).

I attached below some printscreens presenting GPUs performence during depth map generation process. It is worth noticing that in case of both GPUs enabled, none of them reaches 100% of GPU load in opposite to case when only one GPU is enabled.

Are you working on some new update or optimization of GPUs supporting?

Best regards,
Adam

5
General / Set "invalid" tie points as "valid"
« on: April 11, 2019, 04:11:57 PM »
Hello,

I need to align some scanned, archival photographs in Metashape. Tie points extracting works well on this dataset, but for some pair of photos Metashape set hundreds of tie points as "invalid". Is it possible to set "invalid" tie points as "valid" for these pairs using python scripting?

I've tried to change tie points accuracy in the chunk settings panel, but it doesn't help.

Best regards,
Adam

6
Dear Alexey,
Dear Mak,

Do you think that "OpenGL Vendor: Google Inc" can be the source of our problem? Is it possible to force Metashape to launch in NON-ANGLE compatibility mode during Windows Remote Desktop session?

7
Alexey,

Do you have any news in our case?

Best regards,
Adam

8
Hello Alexey,

Meanwhile, i've updated Metashape to 1.5.1 version and i re-ran "Build dense cloud" process in the benchmark project.
Version 1.5.1 is slower than 1.5.0 in our case. The process took 26 min (depth maps) and 26 min (dense cloud) time. In previous version, the same process took 23 (depth maps) and 11 min (dense cloud).

I have done several tests to confirm the results.

Best regards,
Adam

9
General / Re: Agisoft Metashape 1.5.0 pre-release
« on: February 21, 2019, 02:15:40 PM »
Hello,

I try to test cloud processing option, but i've received the following error:
"Open SSL library not found....".

Then i've installed Open SSL library from this link https://slproweb.com/products/Win32OpenSSL.html, but error still persists.

Have you got any idea "why?".


10
Hello Alexey,

I'm cooperating with Jan. The log file, which you asked about, is too big to attaching it below.

I uploaded this file to zippyshare.

https://www10.zippyshare.com/v/Wry5xIMX/file.html

Best regards,
Adam

11
Hello Alexey,

According to your previous posts, i'm not sure if i understood well... which kind of following fiducial marks can be deteced in the automatically way by PhotoScan? ony circles?



I'm asking because few years ago i developed method to preprocessing archival photographs to suitable form allowing to use them in Structure from Motion  technology.  For  this  purpose,  an  automatic  algorithm,  implemented  in the application  called  SAPC  (Scanned  Aerial Photographs Correction), which transforms scans to a form, which characteristic similar to the images captured by a digital camera, was invented. Images, which are created in the applied program as output data, are characterized by the same principal point position in each photo and the same resolution through cutting out the black photo frame. Additionally, SAPC generates a binary image file, which can mask areas of fiducial marks.   I am pleasantly surprised that you have added a new feature in PhotoScan for archival photos. It looks promising!


Link to my paper about SAPC: https://www.researchgate.net/publication/317307995_SAPC_-_APPLICATION_FOR_ADAPTING_SCANNED_ANALOGUE_PHOTOGRAPHS_TO_USE_THEM_IN_STRUCTURE_FROM_MOTION_TECHNOLOGY

12
Bug Reports / Re: Filter photos by marker - problem
« on: August 20, 2018, 02:41:08 PM »
Hi,

I'm not sure if you understand the case well ... in my topic i described the following situation:

1) I imported coordinates of check/control points from the reference pane. During import, checking/unchecking markers were performed automatically based on markers' name ('CHK' were unchecked for example).
2) Then i  want to place marker in the photo.  If the marker is checked, "Filter photos by marker" works great. Unfortunately, in case of check points (unchecked markers) there is no result of filter photos by marker. This is very troublesome, because i don't know if the unchecked marker is out of test area.
3) In this case, i should check marker, filter photos by marker, place marker in photos and then again uncheck this marker. (I am convinced that this function worked for both types of markers in the previous version of Agisoft. Am i right?)

13
Bug Reports / Filter photos by marker - problem
« on: August 20, 2018, 01:31:36 PM »
Hello,

In Agisoft 1.4.3 filter photos by marker function doesn't work for unchecked marker. I am convinced that this function worked for both types of markers in the previous version of Agisoft. This is very troublesome, because after the distribution of points on Check / Control I do not know if the unchecked marker is outside the test area.

I hope this is a bug, not the functionality introduced in the new version of the software.

Best regards,
Adam

14
Python and Java API / Choosing rotating angles types
« on: June 06, 2018, 01:48:03 PM »
Hello,

Is it possible to choose rotation angles type (i mean i want to choose Omega,Phi,Kappa) in python script? I loaded EO from a csv file, but angles were loaded as pitch,roll,yaw by default. In GUI version of agisoft i have the possibility to change angles type in the "Import CSV" window.

Best regards,
Adam

15
General / YPR to omega,phi,kappa
« on: April 12, 2018, 02:41:16 PM »
Hello,

Api functions: "ypr2mat" and "mat2opk" works great, so i decide to ask you about formulas, whose you are using to calculate rotation matrixes. Could you provide some equations? I'm trying to develop a function in Python to calculate omega,phi,kappa directly after my UAV landing into EPSG: 2178 projection. I based on this paper: "New Calibration and Computing Method for Direct Georeferencing of Image and Scanner Data Using.pdf", but my results are not correct comparing to yours in Agisoft :( According to this paper, could you explain me the origin P0 of the tangent plane system? Should it be calculated for each image separately or single set of geographic coordinates for whole photogrammetric block?



I've got longitude,latitude and angles (yaw, pitch, roll) extracted from XMP info for each image (captured by dji phantom).

Code: [Select]
import numpy as np

fi = np.deg2rad(52.113742)
lam = np.deg2rad(21.397086)

roll = np.deg2rad(-0.875)
pitch = np.deg2rad(-0.825)
yaw = np.deg2rad(65.318)


def Cnb(yaw, pitch, roll):

    Rz1 = np.array([[np.cos(yaw), -np.sin(yaw), 0],
                   [np.sin(yaw), np.cos(yaw), 0],
                   [0, 0, 1]])

    Ry1 = np.array([[np.cos(pitch), 0, np.sin(pitch)],
                   [0, 1, 0],
                   [-np.sin(pitch), 0, np.cos(pitch)]])

    Rx1 = np.array([[1, 0, 0],
                   [0, np.cos(roll), -np.sin(roll)],
                   [0, np.sin(roll), np.cos(roll)]])

    Cnb = np.matmul(np.matmul(Rz1,Ry1), Rx1)

    return Cnb


def Cne(fi, lam):

    Ry = np.array([[np.cos(fi+(np.pi/2)), 0, np.sin(fi+(np.pi/2))],
                   [0,1,0],
                   [-np.sin(fi+(np.pi/2)), 0, np.cos(fi+(np.pi/2))]])

    Rz = np.array([[np.cos(lam), -np.sin(lam), 0],
                   [-np.sin(lam), np.cos(lam), 0],
                   [0, 0, 1]])

    Cne = np.matmul(Ry, Rz)

    return Cne


def Cnn(fi, lam, fi0, lam0, lam0GK):
    en = (lam-lam0)*np.cos(fi)*-1
    ee = fi-fi0
    ev = (lam-lam0GK)*np.sin(fi)

    Cnn = np.array([[1, ev, -ee],
                    [-ev, 1, en],
                    [ee, -en, 1]])
    return Cnn


TBb = np.array([[-1,0,0],
                [0,1,0],
                [0,0,-1]])

TEn = np.array([[0,1,0],
                [1,0,0],
                [0,0,-1]])


def CBE(yaw, pitch, roll, fi, lam, fi0, lam0, lam0GK):
    Cnn0 = Cnn(fi, lam, fi0, lam0, lam0GK)
    Cn0e = Cne(fi0, lam0)
    Cnie = Cne(fi, lam)
    Cnib = Cnb(yaw, pitch, roll)

    C = np.matmul(np.matmul(np.matmul(Cnn0, Cn0e), Cnie.transpose()), Cnib)
    return np.matmul(np.matmul(TBb, C.transpose()), TEn.transpose())




#c = CBE(yaw, pitch, roll, fi, lam, fi0=np.deg2rad(0), lam0=np.deg2rad(21), lam0GK=np.deg2rad(21))
b = CBE(yaw, pitch, roll, fi, lam, fi0=fi, lam0=lam, lam0GK=np.deg2rad(21))
c = b.transpose()
print (c)
f = np.rad2deg(np.arctan(c[0,2]/((c[1,2]**2+c[2,2]**2)**0.5)))
omega = np.rad2deg(np.arctan(-c[1,2]/c[2,2]))
kappa = np.rad2deg(np.arctan(-c[0,1]/c[0,0]))

print ('omega = ', omega)
print ('phi = ', f)
print ('kappa = ', kappa)


Best regards,
Adam

Pages: [1] 2