Skip to content

MatchGrid assertion with small grid #25

Description

@FlyingLotus1983

Using the following pipeline:

[
    {"op":"matchTemplate",
        "name":"match",
        "template":"template.png",
        "corr":"{{corr||0.8}}",
        "threshold":"{{threshold||0.6}}",
        "method":"{{method}}",
        "angle":"{{angle}}",
        "output":"{{output}}" },
    {"op":"matchGrid", 
        "name":"grid1", 
        "calibrate":"{{calibrate}}", 
        "scale":"{{scale}}",
        "sep":"[1.5,1.5]",
        "model":"match" },
    {"op":"drawRects", "name":"draw1", "radius":5, "model":"grid1", "color":"{{colorUndistort||[32,255,32]}}"},
    {"op":"undistort", "name":"undistort", "model":"grid1" },
    {"op":"drawRects", "name":"draw2", "radius":2, "model":"match", "color":"{{colorMatch||[32,32,255]}}"}
]

And the following grid / template:

image

image

I get the following assertion:

flyinglotus1983@lunix /media/sf_Computer_Vision/2015-08-22 $ firesight -p matchGrid.json -i endo-uncorrected.png -o output.png
firesight: /home/flyinglotus1983/git/FireSight/stages/calibrate.cpp:446: void GridMatcher::calcGridIndexes(): Assertion `0 <= c && c < gridIndexes.cols' failed.
Aborted

I've tried to look through the code, but I can't seem to find out what's causing it. We don't get this assertion with a larger grid. But I'm not sure what's causing it to fail with a smaller grid. The documentation and lack of comments in the code make this a bit confusing to follow. Any help would be appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions