Forum

Author Topic: how can i use the circle in my code?  (Read 3341 times)

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
how can i use the circle in my code?
« on: February 24, 2017, 02:53:00 PM »
Hello,
I want to give my code have circle,
how can i do ?
I want my code to travel for 10 seconds once
Can i do it?
Please help me
Thanks!!
ps: 123 is my code

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: how can i use the circle in my code?
« Reply #1 on: February 27, 2017, 11:57:44 AM »
Probably you need to use "for" statement?
Best regards,
Alexey Pasumansky,
Agisoft LLC

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: how can i use the circle in my code?
« Reply #2 on: March 01, 2017, 11:19:52 AM »
deer Alexey,
thanks you,
but i don't know "for" can use my  python code.
So can you tall me how can i use for to my python code?
please.
thanks
« Last Edit: March 01, 2017, 11:23:57 AM by 1104312139@gm.kuas.edu.tw »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: how can i use the circle in my code?
« Reply #3 on: March 01, 2017, 11:32:22 AM »
Hello 1104312139,

Then please specify which operations should be performed multiple times?
Best regards,
Alexey Pasumansky,
Agisoft LLC

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: how can i use the circle in my code?
« Reply #4 on: March 01, 2017, 11:42:14 AM »
deer Alexey,
I wnat to the code all re-operation.
After the end of the whole 10 seconds to continue to re-implementation the code.
Sorry, can  do it?
thanks

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: how can i use the circle in my code?
« Reply #5 on: March 01, 2017, 11:47:28 AM »
deer,
this is my code
i wnat to repeat the jpg operating
thanks.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: how can i use the circle in my code?
« Reply #6 on: March 01, 2017, 11:56:46 AM »
Do you wish to repeat the operation completely, or another set of files should be imported and exported under the different name?
Best regards,
Alexey Pasumansky,
Agisoft LLC

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: how can i use the circle in my code?
« Reply #7 on: March 01, 2017, 12:07:05 PM »
deer Alexey,
I want to importe  the same name images,and export different name point cloud(.las).
I hope the code can 10 second repeat.
Thanks you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: how can i use the circle in my code?
« Reply #8 on: March 01, 2017, 12:57:09 PM »


Code: [Select]
import PhotoScan
import math, time

doc = PhotoScan.app.document

for i in range(10):
      chunk = PhotoScan.app.document.addChunk()
      chunk.addPhotos(["c79.jpg", "c80.jpg","c81.jpg"])
      chunk.crs = PhotoScan.CoordinateSystem("EPSG::3826")
      chunk.camera_location_accuracy = ([0.001, 0.001, 0.001])
      chunk.camera_rotation_accuracy = ([0.001, 0.001, 0.001])
      chunk.loadReference("ex.txt", format = PhotoScan.ReferenceFormatCSV, columns = "nxyzabc", delimiter =",")
      PhotoScan.app.update()
      chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, preselection=PhotoScan.GenericPreselection)
      chunk.alignCameras()
      chunk.optimizeCameras(fit_f=True, fit_cxcy=True, fit_skew=True, fit_k1k2k3=True,fit_p1p2=True)
      chunk.buildDenseCloud(quality=PhotoScan.MediumQuality)
      chunk.exportPoints("D:/exports/pto" + str(i) +".las",source=PhotoScan.DataSource.DenseCloudData, format = PhotoScan.PointsFormatLAS,projection=PhotoScan.CoordinateSystem("EPSG::3826"))
      time.sleep(10)
print("All done")
Best regards,
Alexey Pasumansky,
Agisoft LLC

1104312139@gm.kuas.edu.tw

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: how can i use the circle in my code?
« Reply #9 on: March 03, 2017, 12:14:57 PM »
Deer Alexey,
Thanks you very much.
love you.
Thanks you !!! :-* :-*