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

Pages: [1] 2 3 ... 7
1
Python and Java API / Re: How does API determine region size?
« on: May 04, 2021, 03:57:18 PM »
O. What would be the best way to include a given bounding box in the region? I already know it will encompass the area I'm interested in. My concern with the above solution (well, on top of the math not working out) was that I am not sure of the z coordinates, I'd like to capture all of it.

The images I'm working with are partially over water, so I'm having trouble with the default region discarding anything outside of the biggest island that it sees (since water is no points found), but I want to create the orthomosaic over the whole area. It's usually not that big an area, but the automatic region detection does not include things even within the same photo, so I end up losing data even from a photo that was aligned properly.

2
Python and Java API / Re: How does API determine region size?
« on: May 04, 2021, 12:35:52 AM »
Not quite right, seemed to place my region far off z-wise... I'll keep looking into it. Really what I want is to automatically set a region to contain all of my points and extend along my x/y bounds..I'm sure the math works out somehow, just don't have the details worked out.

3
Python and Java API / Re: How does API determine region size?
« on: April 30, 2021, 09:19:11 PM »
On a different post someone explained that the region after aligning points sets itself up automatically pick what it decides is the area of interest, which may exclude outliers if you don't have too many points in some sections.

So before building the mesh, I have to reset the region to encompass my full area of interest so I don't lose any possible information.

How can I do this given a bounding box of my area that I would like as the region?

I have an exact region BBox that I use when creating my orthomosaic, I want to set my region for the chunk to those same bounds, but the Region class uses center/rotation/size. How can I translate BBox to Region?

4
That would explain why this issue is only now occurring. My previous datasets had a much more even point distribution.

Do you have any python function you recommend that would let me automatically extend the region bounds to include all of my aligned images?

5
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.

6
It did seem related to the region, although now my follow up would be wondering why it had automatically set itself to such a small area.
Usually the program has autodetected the proper region size.

I had to manually resize it, as "reset region" just set it to the abnormally small area.

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

8
Python and Java API / Re: Proper method to close project via python API
« on: January 13, 2021, 09:38:31 PM »
I believe I may have solved this issue by running "Metashape.Document()" when I am done with my process.

The issue occurred because I had been opening a project, working on it, and then transferring it to another computer. The other computer then never received any information that I ultimately closed the project. I am now making sure to "close" the project within my script by running Metashape.Document() before sending it to the other computer.

9
General / Re: Read-only mode Dialog Box
« on: January 12, 2021, 07:37:17 PM »
Thank you! I appreciate the follow-up :)

10
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?

11
General / Re: Read-only mode Dialog Box
« on: January 11, 2021, 05:13:54 PM »
Can you post how you solved it? I often have a 'read-only' lock on files I don't have open elsewhere and am unsure of how to remove it.

12
Feature Requests / Re: Can you view multiple orthomosaics at once?
« on: December 17, 2020, 07:35:48 PM »
Thanks! It would be a great feature :)

13
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?

14
General / Re: Can you merge projects?
« on: December 17, 2020, 12:29:26 AM »
Thanks! It was a bit difficult to find there. Works perfectly.

15
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.

Pages: [1] 2 3 ... 7