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

Pages: [1] 2 3
1
Python and Java API / How does API determine region size?
« on: March 29, 2021, 09:24:01 PM »
I have a python script that looks like this. I am running 1.6.5

1. Create Metashape.Document()
2. Load photos, import reference:

Code: [Select]
curChunk = doc.addChunk()
curChunk.addPhotos(newCameras,strip_extensions=False)
curChunk.crs = Metashape.CoordinateSystem("EPSG::4326")
curChunk.importReference(locRefFile,Metashape.ReferenceFormatCSV,columns=myColumns,delimiter=', ',skip_rows=1)
curChunk.camera_location_accuracy = myAccuracyVector
curCunk.camera_rotation_accuracy=myHeadingAccuracyVector


3. Align photos

Code: [Select]
curChunk.matchPhotos(downscale=1,generic_preselection=False)
curChunk.alignCameras(adaptive_fittin=True)

4. Build mesh

Code: [Select]
curChunk.buildModel(surface_type=Metashape.HeightField,
 interpolation = Metashape.EnabledInterpolation,
 face_count=Metashape.MediumFaceCount,
 source_date=Metashape.DataSource.PointCloudDate,
 vertex_colors=False)

4. Build Ortho

Code: [Select]
curChunk.buildOrthomosaic(surface_data=Metashape.ModelData,
 blending_mode=Metashape.MosaicBlending,
 region=Metashape.BBox(Metashape.Vector([b0,b1]),Metashape.Vector([b2,b3]),
 projection=myUTMProjection)



I've left some out for clarity, but this summarized what I'm doing. Up until now this has always worked well for me. Recently I noticed though, that the region and corresponding mesh it's generating is smaller than my area. Sometimes it cuts off just one or two photos at the edge, sometimes almost half of my data. I can go in and manually resize the region, but I don't understand where in the code it is deciding to use such a small region.

My code iterates through several chunks like this. Other than when building my orthomosaic, I never explicitly set any region bounds.

2
General / Point cloud/mesh only covering small area of aligned photos
« on: March 29, 2021, 08:17:57 PM »
I'm using Metashape 1.6.5

I have 18 photos in a line, partially over water. 14 were aligned (2 at each end did not align).

What's unusual now is that despite all the photos aligning quite well, the output mesh and point clouds seem to only exist under about 5 of the photos.

Here is a screenshot of the situation: https://glihtdata.gsfc.nasa.gov/misc/custom_requests/l0s2_screenshot.png

And the full dataset (500mb) is available here: https://glihtdata.gsfc.nasa.gov/misc/custom_requests/20210329_fl_mesh_too_small.tar.gz

I haven't had this happen before, although usually my data is over dense alpine forests. This seems to be a new issue that is occuring more so over these coastal scenes.

3
Python and Java API / Proper method to close project via python API
« on: January 11, 2021, 05:49:19 PM »
I've noticed I end up with a 'read-only' lock on my projects some times after I have made adjustments through my python script.

What is the correct way to close the document so it goes away when I am done working on it in python? I don't see a "close" method anywhere in the API. My best guess is to just open a blank Metashape project when I am done with my current project?

4
Feature Requests / Can you view multiple orthomosaics at once?
« on: December 17, 2020, 12:31:58 AM »
I have my orthomosaics for different parts of a project split into multiple chunks.
Is there a way to view all of the orthomosaics in a project of selected chunks at one time in the same tab?

5
General / Can you merge projects?
« on: December 16, 2020, 02:37:41 AM »
I would like to import a chunk from one project into another one. Is there an easy way to do this?

I see that I can save several pieces of a chunk to possibly re-import to a new chunk in the other project, but am not sure which ones, or if there is a better method.

6
Feature Requests / Free-form Selection for "Draw Polygon"
« on: December 11, 2020, 09:29:21 PM »
Can you add something similar to free-form selection tool for Draw Polygon? (Can require configuration for number of points to drop if needed).

If not, can you allow the "I" key mapping for adding a point to work even while drawing the shape the first time? I am drawing complex shapes around items and my finger is getting tired from clicking so much..   :(

7
Feature Requests / Hot key mapping
« on: December 11, 2020, 07:40:30 PM »
I would like to be able to map a keyboard press to a specific tool.

In this case, I would like to easily switch between the "Navigation" mode and "Draw Polygon" mode of the menu bar, although I could see this being used for all menu items.

8
I am writing a script to let me use keyboard shortcuts to quickly switch between shape groups in a chunk.

I can't see where the python access is to change what the default shape group for the current chunk is though. Is this possible?

9
Bug Reports / Shapes - Points cannot be colored
« on: December 10, 2020, 07:30:53 AM »
The color value does not seem to have any effect on points - they are always white.

10
Bug Reports / Import shapes - does not handle reprojection?
« on: December 10, 2020, 06:40:54 AM »
Using metashape 1.6.2.

I have a shapefile with lat/lon coordinates, and an agisoft project with orthomosaic in UTM 5N.
When I run "Import Shapes" for a chunk, there is no error, and my shapes are loaded, but they are not within my frame of reference. I am guessing they have never been converted from ll to utm.

If I already had shapes in a chunk before running "Import Shapes" (which would be in utm 5N), then I get the error "Error: Unsupported datum transformation" (but I can delete my existing shapes and import these then).

Should either handle reprojection internally to match the orthomosaic coordinates, or should throw the error even if I have no previous shapes in my chunk.

11
Feature Requests / Python snippet tool
« on: December 09, 2020, 07:56:32 PM »
It would be nice to have something similar to the tool that many may know from ArcGIS, which allows you to copy a 'python snippet' of code for the command you just ran.

For example, I know I can right-click a chunk in the GUI and then click "remove model", but I can't figure out how to get the matching code for python. Could be added an option for the "Jobs" window that seems to show the tasks I ran.

Thanks!

12
General / Plans for detailed manual?
« on: November 26, 2020, 06:18:09 AM »
Are there any plans to release a detailed manual for Metashape? I've been using it for several years now, and eventually figured out different tricks to get my photo alignments working out exactly as I'd like, but there are still so many features that are a complete mystery to me.

I would really appreciate an overly detailed manual describing every option available and things to consider when choosing them.

Some questions I have right now, with no idea how to solve them, for example:

1) When I add markers are control points between images, align photos, and the resulting Reference pane shows no lat/lng for many of my markers, what does this mean?

2) How does the accuracy option in "Align Photos" affect the results? I can't tell what exactly it does, recently I selected "Highest" (total errror 60m), "High" (total error 4m) "Medium/Low/Lowest" (total error 3m) and am not sure how to interpret this result

3) If adding manual markers, how badly can I mess up the results if I place them incorrectly? Huge issue, minor issue, etc?

4) Does splitting my data into smaller chunks first negatively affect the output, or can it be helpful? My dataset is usually long aerial transects and personally I found best results when splitting into smaller pieces, but I don't really understand why.

Etc... There are so many questions, based on not fully understanding how the program works. A very detailed manual would be an excellent resource to keep on the bookshelf! Thanks.

13
Python and Java API / Set chunk.shapes.group transparency via python API
« on: November 20, 2020, 09:18:56 AM »
Is it possible to set the transparency of shape groups via the python API? I see the option if I click on Shape Layer Properties, but can't find it in python.

14
General / What is the deafult primary channel?
« on: November 17, 2020, 09:13:21 PM »
If I have a 4 band image and leave the "primary channel" option set to default, which bands are used in the image alignment?

If I have a 3 band image with the default, does it use all 3, or just a certain one for the image alignment?

Is it possible to set only a specific 2/3/+ bands for image alignment? I know I can set it to use 1 specific one, but I wanted to make sure that I'm not losing the option to include 3 bands if I have a multi-band image.

15
General / Is Metashape the best orthomosaic/geotiff viewer?
« on: October 13, 2020, 10:06:30 PM »
I'm doing some manual annotation of my geotiff orthomosaics.

I've been looking at different geotiff viewers, but I can't seem to find any other one that runs as smoothly for viewing and zooming in/out on the orthomosaic. I'm guessing this is because the Metashape project folder already contains all of the pyramids, while the exported geotiffs do not?

Just curious if anyone has a different tool they like, I have a few annotation tools I read about that are useful within ENVI or ArcMap but because of how SLOW it is to scan the images in those, I find myself preferring to create some custom tools to use within Agisoft instead.

Pages: [1] 2 3