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

Pages: [1]
1
Python and Java API / Re: Behavior of Document.save()
« on: April 24, 2018, 03:56:36 PM »
Hello Miles_WADNR,

I mean something like the following:

Code: [Select]
current_doc = PhotoScan.Document()
current_doc.save(path=project_doc)
...
...
...
current_doc.save()

So create the document, save it to some location and only then perform other actions with the document (create chunk, perform processing and etc.)


Hello Alexey,
this issue seems to occure quiet often. It happedn to Miles_WADNR, it happend to Henry (http://www.agisoft.com/forum/index.php?topic=8751.0) and it happend to me (http://www.agisoft.com/forum/index.php?topic=8449.0).


I suggest you include this in the documentation of Document.save(...) in the python api reference document.

Best regards,
Torben

2
You need to save the document with doc.save()
So without the path parameter before building the dem or orthophoto. For whatever reason doc.save("path") and doc.save() do different things...


Code: [Select]
doc.save("/workspace/project.psx")
doc.save()
chunk.buildDem(source=PhotoScan.DataSource.DenseCloudData,
               interpolation=PhotoScan.EnabledInterpolation,
               projection=PhotoScan.CoordinateSystem("EPSG::4326"))

Should work.

3
Python and Java API / Re: Image channel for estimateImageQuality
« on: April 24, 2018, 03:37:29 PM »
The correct way of doing this seems to be this: http://www.agisoft.com/forum/index.php?topic=8744.0

4
This seems to not be true for 1.4.0. It still is camera.photo.meta["Image/Quality"] in that version. Maybe in more recent version it changed. The api reference is not 100% clear about that.

5
Python and Java API / Image channel for estimateImageQuality
« on: April 22, 2018, 01:09:33 PM »
Hello,
is it possible to specify the channel PhotoScan.Utils.estimateImageQuality(...) uses?

My script looks like this:
Code: [Select]
...
chunk.addPhotos(photos)

chunk.primary_channel = 4

for camera in chunk.cameras:
    quality = PhotoScan.Utils.estimateImageQuality(camera.photo.image())

    if quality < 0.7:
        camera.enabled = False
...

However estimateImageQuality seems to operate on channel 0 instead of channel 4.

My primary goal is to disable all photos with a quality lower than 0.7.

Best regards,
Torben

6
General / Re: Orthomosaics from DEM are not correct
« on: March 18, 2018, 01:25:15 PM »
Hello Alexey,
that fixed my problem. Thanks!

7
General / Re: Orthomosaics from DEM are not correct
« on: March 17, 2018, 10:27:11 PM »
Hello Alexey,

I just sent you a pm with the screenshot and the report.

Best regards,
Torben

8
General / Orthomosaics from DEM are not correct
« on: March 16, 2018, 11:49:15 PM »
Hello,

I'm having a probem with the orthomosaics generated with dem as surface looking like the attached image.
When using the mesh as surface everything works fine...

The workflow is pretty standard:
Add Photos -> Align Photos -> Import markers -> Convert Reference to another EPSG system -> Place markers on images -> Optimize Cameras -> Build Dense Cloud -> Build DEM -> Build Orthomosaic.

Any idea what is going on here?

Best regards,
Torben

9
Python and Java API / Re: Can't build DEM in python script
« on: February 20, 2018, 06:02:44 PM »
Well I think i figured it out.

When I use an absoult path for the first doc.save everything works fine.

Code: [Select]
import PhotoScan as ps
import glob

doc = PhotoScan.app.document
doc.save("test.psx")

photos = glob.glob("../testProject/img/*.JPG")

chunk = doc.addChunk()
chunk.addPhotos(photos)
doc.save()

doesn't work, but

Code: [Select]
import PhotoScan as ps
import glob

doc = PhotoScan.app.document
doc.save("/home/torben/script/test.psx")

photos = glob.glob("../testProject/img/*.JPG")

chunk = doc.addChunk()
chunk.addPhotos(photos)
doc.save()

does.

---
Torben




EDIT:

Well it doesn't need to be an absolute path after all.
doc.save("./test.psx") is fine as well.
doc.save("test.psx") is not fine.



10
Python and Java API / Re: Can't build DEM in python script
« on: February 20, 2018, 05:56:52 PM »
Hello Alexey,

I'm running the script from the command line. No other instance of Photoscan is running.

Code: [Select]
import PhotoScan as ps
import glob

doc = PhotoScan.app.document
doc.save("test.psx")

photos = glob.glob("../testProject/img/*.JPG")

chunk = doc.addChunk()
chunk.addPhotos(photos)
doc.save()

results in

Code: [Select]
SaveProject
saved project in 0.007209 sec
LoadProject
loaded project in 0.000207 sec
AddPhotos
Traceback (most recent call last):
  File "ref.py", line 13, in <module>
    doc.save()
OSError: Document.save(): editing is disabled in read-only mode

---
Torben

11
Python and Java API / Re: Can't build DEM in python script
« on: February 20, 2018, 05:34:54 PM »
Hello Alexey,

i tried your suggestion. Saving with only doc.save() doesn't seem to work: "OSError: Document.save(): editing is disabled in read-only mode"

https://pastebin.com/yM88CkdD

---
Torben


12
Python and Java API / Can't build DEM in python script
« on: February 20, 2018, 04:52:54 PM »
Hello,
whenever I try to call buildDem on chunk, a runtime error occures. I'm using Photoscan 1.4 btw

Here is the console output: https://pastebin.com/2yHgkVaY

And here is what my script does: https://pastebin.com/PQ4diYX7

I'm saving the project before calling buildDem as you can see. "RuntimeError: Empty frame path
" doesn't seem to be documented anywhere.

Am I missing something here? Or is this a bug?

---
Torben


Pages: [1]