Skip to content

Possible bug in ETF.cpp? #12

Closed
Closed

Description

@askerlee

ETF.cpp:86 is:
float w_m = computeWm(gradientMag.at<float>(y, x), gradientMag.at<float>(r, c));
However gradientMag is a 3-channel Mat (CV_32FC3). gradientMag.at(y, x) actually returns a value at some other position (I'm not sure where it actually accesses). Debugging shows that in most cases it seems to return 0, and thus in most cases computeWm() returns 0.5, effectively disabling the impact of Wm. This problem doesn't make the output image obviously wrong. Though I guess it's better to correct it.
Here is the fix I propose:
float w_m = computeWm( norm( gradientMag.at<Vec3f>(y, x) ), norm( gradientMag.at<float>(r, c) ) );

Activity

  1. SSARCandy commented on Nov 10, 2018

    @SSARCandy
    Owner

    You are right, thanks to pointing it out.

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