Skip to content

Disparity map results in nan when focus_distance = 0 #9

@nikhil-97

Description

@nikhil-97

There's an error in the function render_depth_and_disp_maps(..) in lightfield_simulator.py .
When the LF.focus_dist is set to 0, it results in the calculated disp becoming nan as it is divided by 0.
Better to perform a check before applying the formula, so that LF.focus_dist or LF.sensor_size are not set to zero.

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