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

Pages: 1 ... 3 4 [5] 6 7 ... 18
61
Python and Java API / Re: Update script for 1.8
« on: June 02, 2022, 03:58:18 PM »
Thank you, Paul, it works now!.  I thought that you had written that script or at least modified it.

I round the yd3 because of the scale of the piles that I'm measuring. They range 500 to 30,000 yd3 and no one cares about the partials. It results in a cleaner report.

Now, 8 decimal places on a coordinate, I want that !  :)

62
Python and Java API / Update script for 1.8
« on: June 02, 2022, 06:58:53 AM »
What needs to be changed to get this script to run in v.1.8 please?

Code: [Select]
# This script outputs measurements in US survey foot
import Metashape as PhotoScan

def main():
chunk = PhotoScan.app.document.chunk #active chunk

method = "bestfit" # "mean", custom
volume_tot = "total" #"above", "below"
volume_ab = "above"
volume_be = "below"
ca = 3.2808333333 * 3.2808333333 # conversion from m2 to USft2
cv = 3.2808333333 * 3.2808333333 * 3.2808333333 / 27 # conversion from m3 to USyd3

if not chunk.shapes:
raise Exception("No shapes!")
return False

if not chunk.elevation:
raise Exception("No Elevation Model!")
return False

if not len(chunk.shapes):
raise Exception("No shapes!")
return False

path = PhotoScan.app.getSaveFileName("Specify output path:", filter ="Text / CSV (*.txt *.csv);;All files (*.*)")
if not path:
raise Exception("Invalid path!")
return False

file = open(path, "wt")
file.write("Layer Label\t Shape ID\tShape Label\t   Volume-yd3 (" + volume_ab + ")\t  Area-ft2\tMethod\n")

for shape in chunk.shapes:
if shape.type != PhotoScan.Shape.Polygon:
continue
label = shape.label
if not label:
label = "<no label>"
layer = shape.group.label
if not layer:
layer = "<no label>"

layer_id = shape.group.key
shape_id = shape.key
area = shape.area()
volume = shape.volume(level = method)
output = "{:11s}\t{:8d}\t{:11s}\t{:16.5f}\t{:12.5f}\t{:8s}\n".format(layer, shape_id, label, round(volume[volume_ab]*cv), round(area*ca), str(method))
file.write(output)
file.flush()

file.close()
print("Finished")

PhotoScan.app.addMenuItem("Volumes/Export measurements for polygons", main)

63
General / Re: Possible rolling shutter effect
« on: May 29, 2022, 02:39:38 AM »
Have a look at the conversation here:
https://www.agisoft.com/forum/index.php?topic=14480.0

64
Hi Corensia,

Unfortunately, the word "camera" already had an English definition before the existence of Agisoft (and even photogrammetry for that matter).  And, I believe Agisoft was using the term (incorrectly IMO) before Photoscan started working with thermal imagery.

The fact is, that MS processes "images" (or "photos") and not cameras.  No matter what they call them.  It's not a problem for me now. It was just confusing when getting started.  My comment about the USGS paper was simply that those folks, probably a few with doctorate degrees in geo-science, agreed with this enough to mention it.  As to why the Agisoft folks leave the error in place is unclear.


65
General / Re: Help with Camera Alignment
« on: April 28, 2022, 12:29:12 AM »
When you set unlimited tie points, you are setting yourself up for many poor tie points which will be worse for reconstruction than fewer good quality tie points.  Have you tried by using the default (4000) ?  More is not better in this case.

66
General / Re: Blurry patches in the orthomosaic
« on: April 25, 2022, 10:30:17 PM »
Also, how can I create a Solidview screenshot ?

Thank you very much,

I think Alexey is referring to the monochrome gray coloured mesh view.

67
That report is very detailed and useful for sure.  But it doesn't really go into the camera coefficients.  Mostly just suggesting:

Quote
“Optimize Cameras” with one of the following options:
• default coefficients selected [f, k1, k2, k3, cx,
cy, p1, p2];
• all coefficients selected [f, k1, k2, k3, k4, cx, cy, p1,
p2, b1, b2] and “Fit additional corrections”; or
• some other combination of coefficients that fits the
data and camera.

I suspect with the cameras on consumer drones, with maybe the exception of the P1, using the default coefficients are probably best if you don't know any better.  Thoughts?

I found it refreshing to see that the report authors included the following commentary on MS's use of the term "cameras" which agrees with what I thought when I started using the application.  The application is complex enough without adding unnecessary confusion.  Not sure why Agisoft doesn't correct this which was probably just the result of translation.  Perhaps they think it is too late and just live with it.

Quote
Note that the term “camera” in Metashape is used to describe a specific image at a specific time and location, and the term is also
the tool used to take photographs. Metashape uses “image”, “photograph”, and “camera” interchangeably. This creates an unwanted complexity in the software;

68
Quote
I've done every export possible but none seems to save the pixel locations of markers on the photos

You can export the marker's geographic or projected coordinates.  I'm not sure what you are trying to achieve when you say the "pixel location" so no help there.

Maybe Paul's script might be helpful.

69
General / Re: Measuring volume between specific elevation help
« on: April 17, 2022, 08:39:41 PM »
Quote
How or where do you specify the two different elevations that you are trying to measure between?

A) You draw a polygon.

B) I think what Paul is describing is selecting ANY POINT on the surface that lies at  "elevation A"  and below and subtracting all the surface that is "elevation B" from that. This will work if you want to find the volume difference between those values everywhere.

Typically, your surface will be larger than the area where you want calculations.  In that case, you use polygons.  You understand defining the area with a polygon is generally very easy?


70
Quote
I have yet to see discussion on any forum, Facebook group, or a tutorial about using ground control points that aren't GPSed checkerboard pads. Discussion of using manholes and things like that may exist somewhere but I haven't seen it!

Like I said above, it depends on the environment being scanned.  The typical discussions you are talking about are probably "unbuilt".  That said, identifying a marker in a photo set is easier and faster when it is targeted in a uniform way.  Think production here.  The target itself, whether a painted square, painted lines, bucket lid, etc. doesn't matter so long as they make identifying the exact point easier at pixel level.  Placing the point in software, and the accuracy of it's coordinates are what is important.

I can't help with Realtiy Capture, and have no idea what a bundle file is.  You can export markers and camera locations in typical .txt



71
General / Re: Measuring volume between specific elevation help
« on: April 17, 2022, 07:09:56 AM »
You would need to draw the polygon to define the extents of your calculation area.

72
Quote
Since I first started looking into photogrammetry I've been wondering why ground control points are exclusively considered to be square targets that you put on the ground.

This is incorrect.  Ground targets are generally used because in many / most areas being developed, there is not established infrastructure in place that can be used reliably to establish centimeter level precision when developing a 3d model.  In cases like yours where there is plenty of substantial, identifiable objects that can be measured and assigned coordinates, they are fine and often preferable because they are permanent.

Quote
I learned a lot in the past few weeks, but I only have 6 days left on my trial, so in a week I'll have to switch to another program that I can afford. Unfortunately there is no product from Agisoft that lets someone like me do this kind of non-commercial mapping :( I hope they consider some kind of home use or hobby license. The standard license is fine for objects but without geographic capability it's not useful for documenting landscapes

This service was recently suggested by Agisoft where you can run projects and pay for only what you use.  Maybe it might be an option for you.

https://www.geocloud.work/

Quote
Is there a way to export the marker locations on the photos that other programs like Reality Capture can interpret?

Yes.  Similar to the importing of .csv coordinates, you can also export marker and/or camera positions.





73
I have not seen a good, not too technical, explanation about which parameters are relevant for which camera types. And a workflow strategy based upon the available settings in Metashape.
 
There is clearly an opening for someone that knows the subject well enough to teach it to others to present a white paper or video. Or, perhaps the material already exists and someone could share it?

74
General / Re: Adding markers from excel or csv
« on: April 16, 2022, 06:07:24 PM »
Importing Reference files for the images and the Markers is also available from the FILE menu.  FILE > IMPORT > IMPORT REFERENCE.

You might find some tips here:  https://agisoft.freshdesk.com/support/solutions/articles/31000153696

75
General / Re: Measuring volume between specific elevation help
« on: April 14, 2022, 10:31:24 PM »
It should be. The area to be calculated is determined by a polygon and you can place the polygon wherever you wish.
You can specify the elevation of the polygon.

Pages: 1 ... 3 4 [5] 6 7 ... 18