Forum

Author Topic: chunk.detectMarkers fails to find  (Read 1436 times)

forumname

  • Newbie
  • *
  • Posts: 36
    • View Profile
chunk.detectMarkers fails to find
« on: June 05, 2023, 04:22:18 AM »
I am attempting to replicate the marker detection behavior of the GUI. In the GUI, all 12 bit markers are detected.

chunk.detectMarkers() detects all markers.

chunk.detectMarkers(frames=0) [or any other frame] returns nothing.

This is performed on the same doc. What does the GUI operation do that the (python) API does not?

forumname

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: chunk.detectMarkers fails to find
« Reply #1 on: June 05, 2023, 04:37:51 AM »
The error was a result of an interaction between chunk.addFrames() and removing frames. As a result, frame 0 of the chunk did not have key 0, and chunk.detectMarkers expects the key, not the frame number (which is not clear in the function help).

forumname

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: chunk.detectMarkers fails to find
« Reply #2 on: June 05, 2023, 03:37:52 PM »
Unfortunately, chunk.markers still turns up empty.
« Last Edit: June 09, 2023, 12:48:17 AM by forumname »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14753
    • View Profile
Re: chunk.detectMarkers fails to find
« Reply #3 on: June 05, 2023, 04:47:44 PM »
Hello forumname,

If you need to apply the detect markers operation to chunk.frames[0] you need to do the following:
Code: [Select]
chunk.detectMarkers(frames = [chunk.frames[0].key])
Check the documentation (API Reference) for the arguments that require the list to input, if the required type is int, then you need to pass list of .key elements for chunks, cameras, frames and etc.
Best regards,
Alexey Pasumansky,
Agisoft LLC

forumname

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: chunk.detectMarkers fails to find
« Reply #4 on: June 06, 2023, 12:12:47 AM »
Thanks Alexey, when I do this with the API I simply get an empty array in chunk.markers:.

> chunk.detectMarkers(frames=[chunk.frames[0].key])
DetectMarkers: marker type = Circular 12 bit, tolerance = 50

camera0: 2 targets
camera1: 0 targets
camera2: 2 targets
camera3: 2 targets
camera4: 3 targets
camera5: 3 targets

chunk.markers
Out[11]: []
:

Thanks!
« Last Edit: June 06, 2023, 12:20:53 AM by forumname »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14753
    • View Profile
Re: chunk.detectMarkers fails to find
« Reply #5 on: June 06, 2023, 05:17:48 PM »
Hello forumname,

And what log do you get when running Detect Markers for the first frame via GUI with the same parameters?
Best regards,
Alexey Pasumansky,
Agisoft LLC