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

* Replacing the generator with numpy vector operations from lu_decomposition.

* Revert "Replacing the generator with numpy vector operations from lu_decomposition."

This reverts commit ad217c6616.

* Replaced lena.jpg with lena_small.jpg to make tests faster.

* Update digital_image_processing/test_digital_image_processing.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update test_digital_image_processing.py

tests fail, I'll try an empty commit

* Apply suggestions from code review

* Update test_digital_image_processing.py

added clarifications

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update test_digital_image_processing.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
Kamil 2023-10-09 20:46:38 +05:00 committed by GitHub
parent c0da015b7d
commit ba828fe621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,9 +96,16 @@ def test_nearest_neighbour(
def test_local_binary_pattern():
file_path = "digital_image_processing/image_data/lena.jpg"
# pull request 10161 before:
# "digital_image_processing/image_data/lena.jpg"
# after: "digital_image_processing/image_data/lena_small.jpg"
# Reading the image and converting it to grayscale.
from os import getenv # Speed up our Continuous Integration tests
file_name = "lena_small.jpg" if getenv("CI") else "lena.jpg"
file_path = f"digital_image_processing/image_data/{file_name}"
# Reading the image and converting it to grayscale
image = imread(file_path, 0)
# Test for get_neighbors_pixel function() return not None