Skip to content

Fix for MeshMapping Bug #34

@NabbefeldG

Description

@NabbefeldG

The current implementation of the CreatVertexGrid function has a bug that causes broken projections. This function mixes up rows and columns when defining the grid.
In the current implementation preojections are only computed correctly when the number of cols and rows are even (4x4 mesh):
Image

But produces tearing and artifacts when this is not the case (3x4 mesh):
Image

When determining the number of rows in the calibration mesh, the code currently uses the number of cols (BonVision.CreateVertexGrid.cs, Line 20):
var rows = value.Select(row => row[3]).Distinct().Count();
Fix:
var rows = value.Select(row => row[2]).Distinct().Count();

This change fixes projections for all calibration/interpolation settings, here for the same 3x4 mesh:
Image

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