Skip to content

test_digital_image_processing -> test_local_binary_pattern replacing a large image with a smaller one #10161

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

Merged
merged 10 commits into from
Oct 9, 2023
7 changes: 5 additions & 2 deletions digital_image_processing/test_digital_image_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ def test_nearest_neighbour(


def test_local_binary_pattern():
file_path = "digital_image_processing/image_data/lena.jpg"
from os import getenv # Speed up our Continuous Integration tests

# Reading the image and converting it to grayscale.
file_name = "lena_small.jpg" if getenv("CI") else "lena.jpg"
file_path = f"digital_image_processing/image_data/{file_name}.jpg"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
file_path = f"digital_image_processing/image_data/{file_name}.jpg"
file_path = f"digital_image_processing/image_data/{file_name}"

The build is failing because your filepath is "lena.jpg.jpg"

Copy link
Member

Choose a reason for hiding this comment

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

My mistake. :-(


# Reading the image and converting it to grayscale
image = imread(file_path, 0)

# Test for get_neighbors_pixel function() return not None
Expand Down