Skip to content

[Bug] Issue with Python port of Liu et al. #3

Description

@EnoxmolingSoftware

Method

Chou & Li

Language port

MATLAB

Describe the bug

I cloned the repo and ran the Liu et al. Python port on a grayscale image by editing the hardcoded path in Liu et al/Python/main.py:

cd "Liu et al/Python"
# edit main.py: distImg = cv2.imread('<my image>.bmp', cv2.IMREAD_GRAYSCALE)
python main.py

The output JND map looks qualitatively reasonable (low at edges, high in textures), but it doesn't agree with the MATLAB port on the same image — textured regions get a visibly higher budget in Python than in MATLAB. Looking at main.py I see jnd_id uses cv2.GaussianBlur(I, (7, 7), sigma) to do the structural / textural split, while my MATLAB run of JND_ID(im, 1.0) clearly calls something else.

Is the Python jnd_id(I, lambda_=0.8) meant to be equivalent to the MATLAB JND_ID(I, lambda), or a deliberate simplification? Tried sweeping lambda_ from 0.1 to 2.0 — the gap stays.

Minimal reproduction

.

Environment

Additional context

No response

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions