mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-01 12:28:38 +00:00
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 ad217c66165898d62b76cc89ba09c2d7049b6448. * 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:
parent
c0da015b7d
commit
ba828fe621
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user