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.


Topics - robertomstocker

Pages: [1]
1
General / Identifying bands from multispectral images in folder structure
« on: December 20, 2017, 12:48:09 AM »
I've imported multispectral images using the folder structure following the instruction from section "To create a chunk from multifolder layout" in document www.agisoft.com/pdf/photoscan-pro_1_3_en.pdf

It works perfectly, except that I can't find a way to identify output bands. I imported a folder containing 5 folders names: "blue", "green", "red", "rededge" and "nir", but Photoscan produces a Band 1, Band 2, Band 3, Band 4, Band 5 structure when I export a GeoTIFF and I don't know the correspondence between my folders and the band numbers.

Thanks!

2
I'm trying to achieve two coordinate conversions:

1. Using (x, y) from a photo, determine the corresponding (lng, lat) coordinates.

For this part, I believe the code posted here http://www.agisoft.com/forum/index.php?topic=7446.0 should work:

Code: [Select]
chunk = PhotoScan.app.document.chunk
camera = chunk.cameras[0]
point2D = PhotoScan.Vector([imgX,imgY]) # coordinates of the point on the given photo
sensor = camera.sensor
calibration = sensor.calibration
x = chunk.point_cloud.pickPoint(camera.center, camera.transform.mulp(sensor.calibration.unproject(point2D)))

adding

Code: [Select]
result = chunk.crs.project(x)

I can't find the "pickPoint" function in the API Reference document, but would this return the expected result?

2. Using a (lng, lat) to determine the corresponding (x, y) pixel coordinates in each photo of the project.

For this case, I was thinking on creating a Marker to simplify the code

Code: [Select]
chunk = PhotoScan.app.document.chunk
pointWorld2D = PhotoScan.Vector([lng, lat])
x = crs.unproject(pointWorld2D)
chunk.addMarker(point = x)

and then loop over "marker.projections" to obtain the (x, y) pairs for each camera.

Am I on the correct path?

Thanks!

P.S: This post also gave me a couple of clues: http://www.agisoft.com/forum/index.php?topic=6053.msg29355#msg29355

Pages: [1]