Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8306383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:19:17+00:00 2026-06-08T18:19:17+00:00

I am writing a script in python, but I am a beginner (started yesterday).

  • 0

I am writing a script in python, but I am a beginner (started yesterday).

Basically, I just create chunks that I fill with ~10 pictures, align them, build the model, and build the texture. Now I have my chunks and I want to align them…

From the manual:

PhotoScan.alignChunks(chunks, reference, method=’points’, accuracy=’high’, preselection=False)

Aligns specified set of chunks.

Parameters

  • chunks (list) – List of chunks to be aligned.
  • reference (Chunk) – Chunk to be used as a reference.
  • method (string) – Alignment method in [’points’, ‘markers’].
  • accuracy (string) – Alignment accuracy in [’high’, ‘medium’, ‘low’].
  • preselection (boolean) – Enables image pair preselection.

Returns Success of operation.

Return type boolean

I tried to align the chunks, but the script throws an error at line 26:

TypeError: expected a list of chunks as an argument

Do you have any idea how I can make it work?

This is my current code:

import PhotoScan
doc = PhotoScan.app.document
main_doc = PhotoScan.app.document
chunk = PhotoScan.Chunk()
proj = PhotoScan.GeoProjection()
proj.init("EPSG::32641")
gc = chunk.ground_control
gc.projection = proj
working_path = "x:\\New_agisoft\\ok\\Optical\\"
for i in range (1,3):
    new_chunk = PhotoScan.Chunk()
    new_chunk.label = str(i)
    loop = i*10 
    loo = (i-1)*10
    doc.chunks.add(new_chunk)
    for j in range (loo,loop):
        file_path = working_path + str(j) + ".jpg"
        new_chunk.photos.add(file_path)
    gc = new_chunk.ground_control
    gc.loadExif()
    gc.apply()
    main_doc.active = len(main_doc.chunks) - 1
    doc.activeChunk.alignPhotos(accuracy="low", preselection="ground control")
    doc.activeChunk.buildModel(quality="lowest", object="height field", geometry="smooth", faces=50000)
    doc.activeChunk.buildTexture(mapping="generic", blending="average", width=2048, height=2048)
PhotoScan.alignChunks(,1,method="points",accuracy='low', preselection=True)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:19:17+00:00Added an answer on June 8, 2026 at 6:19 pm

    Note: I have never used this module.

    You’re calling PhotoScan.alignChunks with an empty first argument, while the documentation states that it expects a list of chunks.

    You could initialize an empty list before your loop:

    chunks = []
    

    And add completed chunks to the list from inside the loop:

        # ...
        chunks.append(new_chunk)
    

    Then call the function:

    PhotoScan.alignChunks(chunks, chunk[0], ...)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing python script which gets links from website. But when I tried
I'm writing a Python script at work that contains a part with a large
I amm writing a little python script that will grab information from VMs of
I'm writing a cross-platform python script that needs to know if and where Cygwin
I'm currently writing a Python GDB script. The problem is that it has to
I'm writing a Python script that'll fork a child process. The parent process should
I am writing a Python script that uses data of dubious quality. The data
I am writing a Python script on Windows, that needs to work on a
So I'm writing a python script that is updating values in a mysql table.
I am writing a python script in order to write a tex file. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.