Skip to content

getting extras from estimate_motion has a bug #4235

@JeffreyBoucher

Description

@JeffreyBoucher

Hello,

estimate_motion() has an option extra_outputs which currently (in my version 103.0) doesn't work, at least with the iterative template method. The specific problem comes from two things: in estimate motion lines 104-107

if extra_outputs:
    extra = {}
else:
    extra = None

and then in iterative_template lines 133 to 139:

    if extra:
        extra["non_rigid_windows"] = non_rigid_windows
        extra["motion_histograms"] = motion_histograms
        extra["target_histogram"] = target_histogram
        extra["shift_covs_block"] = shift_covs_block
        extra["temporal_hist_bin_edges"] = temporal_hist_bin_edges
        extra["spatial_hist_bin_edges"] = spatial_hist_bin_edges

both options for extra in the former code block return false, so the latter code block is inaccessible

I have bypassed this for now by doing:

if extra_outputs:
    extra = 1
else:
    extra = None

But perhaps this breaks other things...

Thanks!

Jeff Boucher

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions