Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BrightContrastModule.py #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update BrightContrastModule.py #139

wants to merge 1 commit into from

Conversation

Rexmiao
Copy link
Contributor

@Rexmiao Rexmiao commented Jul 24, 2019

Tenen Grad -1

@choosehappy
Copy link
Owner

Did you test this? are you sure it works correctly? see my comment in the code

@@ -56,4 +57,10 @@ def getContrast(s,params):
#RMS contrast
rms_contrast=np.sqrt(pow(img - img.mean(), 2).sum() / img.size)
s.addToPrintList("rms_contrast", str(rms_contrast))

#TenenGrad contrast
tmp = sobel(img)
Copy link
Owner

@choosehappy choosehappy Jul 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at this sobel(img)

doesn't this assume that img is a matrix?

Above, if limit_to_mask is true:

    if (limit_to_mask):
        img = img[s["img_mask_use"]]

isn't img then a vector, as its been indexed by a binary mask matrix, and not a 2d array/matrix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants