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

Pages: [1] 2 3
1
Python and Java API / How do I convert a camera to ENU?
« on: September 18, 2018, 02:56:45 AM »
Hey Alexey,

I have exported camera positions in an XML file and want to convert a camera to ENU using the transform at the end of the XML file. I read that the transform represents a ECEF -> local transform. So how do you use it to convert the camera transform to ENU?
Code: [Select]
<camera id="0" label="08e99038b0f96f7003556eb23877402a.jpg" sensor_id="0" enabled="true">
<transform>...</transform>
<orientation>1</orientation>
<reference x="-79.153242361111097" y="37.400188583333303" z="208.38200000000001" enabled="true"/>
</camera>
...

<transform>
<rotation>2.5818723527903192e-01 9.5254434818531153e-01 1.6124086417279426e-01 -5.3390401398553078e-01 2.7978097103927702e-01 -7.9791547929242301e-01 -8.0516200567904861e-01 1.1992444698450438e-01 5.8080312639168274e-01</rotation>
<translation>9.5474336100430344e+05 -4.9826859996768227e+06 3.8528608851181311e+06</translation>
<scale>9.1296180142317489e+00</scale>
</transform>

The reason I want to do this is I want to find the 4 points on the ground (in geodetic coordinates (lon, lat, alt) that correspond to the corner pixels of the image.

2
Hi Alexey!

I have generated the PointCloud which appears to be in WGS84, but the camera positions and poses seem to be in a local coordinate system. How do I convert a point in the point cloud into the same local coordinate system as the cameras?

Thank you

3
Python and Java API / How do you update marker locations with the API?
« on: March 15, 2017, 07:00:00 PM »
Hey Aleksy

I have placed a marker in 8 images and tied it so it's green with the API. How do I update the location of the (gray) markers in the remaining images using the API based on the position of the 8 tied markers?

Thanks so much, you rock!

Nick

4
Hey Aleksey,

In PhotoScan when adding Ground Control Markers what is the difference between the grey, blue and green flags.

Also which flags are used when optimizing camera parameters and how are they used based on the colour?

Thanks

Nick

5
Also does camera.project(v) internally perform K * [camera.rotation | camera.translation] * v ?

Thanks so much for the help! Really appreciate it :)

6
Thanks Alexey that's helpful, but what is the difference between mulv and using *

for example why do:

v = PhotoScan.Vector([0.3, 0.6, 0.9])
camera.transform.mulv(v)

and

v_homog = PhotoScan.Vector([0.3, 0.6, 0.9, 1.0]) #homogenous version of v
camera.transform * v_homog

Give different results?

7
I have PhotoScan project where I have estimated the camera positions and now want to add some markers to it. I am struggling to understand the sequence of transformations that move a 3D marker position to a pixel in an image?

I tried:

camPos3D = camera.sensor.calibration.transform * chunk.transform *  markerPos3d

which should give the position of the marker relative to the camera, and then:

camera.project(camPos3D)


but it doesn't work?

In particular what is the purpose of the chunk transform. The cameras position are estimated in world coordinates right or are they relative to the chunk which is relative to the world?

Ultimately I want to add a marker manually and then run a script that will try and project that marker into each image and if it can output the pixel in the image that corresponds to the marker projection.

8
General / Re: What units are exported point clouds in for NAD27?
« on: September 23, 2015, 09:18:17 PM »
Looks like the two coordinate systems are:

Geographic Coordinate System: WGS 84 (EPSG::4326)
Geodetic Datum: World Geodetic System 1984 (EPSG::6326)
Ellipsoid: WGS 84 (EPSG::7030)
Prime Meridian: Greenwich (EPSG::8901)
Angular Units: degree (EPSG::9102)


Projected Coordinate System: NAD27 / California zone II (EPSG::26742)
Projection Method: Lambert Conic Conformal (2SP)
    Latitude of false origin: 37.6667
    Longitude of false origin: -122
    Latitude of first standard parallel: 39.8333
    Latitude of second standard parallel: 38.3333
    Easting of false origin: 2e+06
    Northing of false origin: 0
Geographic Coordinate System: NAD27 (EPSG::4267)
Geodetic Datum: North American Datum 1927 (EPSG::6267)
Ellipsoid: Clarke 1866 (EPSG::7008)
Prime Meridian: Greenwich (EPSG::8901)
Linear Units: US survey foot (EPSG::9003)

Does this explain the elevation difference?

9
General / What does Agisoft use for coordinate conversion?
« on: September 23, 2015, 09:08:42 PM »
GDAL or PROJ.4 or something else?

10
General / Re: What units are exported point clouds in for NAD27?
« on: September 23, 2015, 08:55:51 PM »
I guess what I'm trying to find out is:

WGS84 + h is NAD27 CA 2 + ??

Do you know the Proj file for the WGS84 transformation too?

11
General / Re: What units are exported point clouds in for NAD27?
« on: September 23, 2015, 08:28:51 PM »
That's interesting is there anyway to compensate for this because pyproj doesn't seem to take it into account. If I try and manually transform the first point the elevation doesn't change.

import pyproj

p1 = pyproj.Proj("+init=EPSG:4326")
p2 = pyproj.Proj("+init=EPSG:26742")

a = (-121.330272, 38.547287, 5.661467)
b = (2191840.924977, 321431.770306, 44.012074)

print "Source point", a
print "Target point", b
print 'Converted: ', pyproj.transform(p1, p2, *a) # different :()

12
General / Re: What units are exported point clouds in for NAD27?
« on: September 23, 2015, 07:51:24 PM »
Really? But look at the first line for example 5.661467 meters is not 44.012074 feet?

13
General / Re: What units are exported point clouds in for NAD27?
« on: September 22, 2015, 11:48:02 PM »
Also the original values ellipsoidal heights?  What vertical coordinate system are they in?

Thanks so much for your help.

14
General / What units are exported point clouds in for NAD27?
« on: September 22, 2015, 11:30:24 PM »
I have a point cloud in PS and have exported the point in both WGS84 and NAD27 Zone II. The WGS data looks like this, with elevation in meters:

-121.330272 38.547287 5.661467
-121.330272 38.547287 5.646508
-121.330272 38.547287 5.661565
-121.330272 38.547287 5.657426

where as the NAD27 Zone II data looks like this:

2191840.924977 321431.770306 44.012074
2191840.804111 321431.731749 43.962994
2191840.798730 321431.632417 44.012394
2191840.725906 321431.877987 43.998812
2191840.639473 321431.718561 44.001784

I don't understand why the elevation is different and what units it is meant to be in, doesn't seem to be in either meters or feet. Something else is going on?

15
General / Is point cloud export to EPSG:2956 correct?
« on: August 14, 2015, 01:08:53 AM »
Hi there,

I wanted to export a point cloud in EPSG:2956. To confirm the results I also exported the point cloud in EPSG:4326 and converted it to EPSG:2956 using Proj4 unfortunately the results are different. If there any reason for this - how do I know which is correct. Here is a sample script should the different for one point:

import pyproj

p1 = pyproj.Proj("+init=EPSG:4326")
p2 = pyproj.Proj("+init=EPSG:2956")

# a point from photoscan exported point cloud in in EPSG:4326
epsg4326_point = (-110.28868093, 64.46331476, 391.28830036)
# a point from photoscan exported point cloud in EPSG:4326
epsg2956_point = (534215.31186246, 7148835.02251115, 391.45030254)

print "Source point", epsg4326_point
print ""
print "Target point", epsg2956_point
print 'Manually converted result (different): ', pyproj.transform(p1, p2, *epsg4326_point)

Pages: [1] 2 3