Skip to content
Snippets Groups Projects
Commit 8c1f8613 authored by Laurent COLBOIS's avatar Laurent COLBOIS
Browse files

[Preprocessor] Fix method name `color_channel` -> `change_color_channel`

parent 195e72ae
No related branches found
No related tags found
1 merge request!75[Preprocessor] Fix color channel
......@@ -60,7 +60,7 @@ class Base(TransformerMixin, BaseEstimator):
def fit(self, X, y=None):
return self
def color_channel(self, image):
def change_color_channel(self, image):
"""color_channel(image) -> channel
Returns the channel of the given image, which was selected in the
......@@ -121,5 +121,5 @@ class Base(TransformerMixin, BaseEstimator):
def _transform_one_image(self, image):
assert isinstance(image, numpy.ndarray) and image.ndim in (2, 3)
# convert to grayscale
image = self.color_channel(image)
image = self.change_color_channel(image)
return self.data_type(image)
......@@ -337,7 +337,7 @@ class FaceCrop(Base):
return None
# convert to the desired color channel
image = self.color_channel(image)
image = self.change_color_channel(image)
# annotate the image if annotations are missing
if (
......
......@@ -94,7 +94,7 @@ class HistogramEqualization(Base):
"""
def _crop(image, annotations):
image = self.color_channel(image)
image = self.change_color_channel(image)
if self.cropper is not None:
image = self.cropper.transform([image], [annotations])[0]
image = self.equalize_histogram(image)
......
......@@ -118,7 +118,7 @@ class INormLBP(Base):
"""
def _crop(image, annotations=None):
image = self.color_channel(image)
image = self.change_color_channel(image)
if self.cropper is not None:
image = self.cropper.transform([image], annotations=[annotations])[0]
image = self.lbp_extractor(image)
......
......@@ -91,7 +91,7 @@ class SelfQuotientImage(Base):
The cropped and photometrically enhanced face.
"""
def _crop(image, annotations):
image = self.color_channel(image)
image = self.change_color_channel(image)
if self.cropper is not None:
image = self.cropper.transform([image], [annotations])[0]
image = self.self_quotient(image)
......
......@@ -108,7 +108,7 @@ class TanTriggs(Base):
"""
def _crop(image, annotations=None):
image = self.color_channel(image)
image = self.change_color_channel(image)
if self.cropper is not None:
image = self.cropper.transform([image], [annotations])[0]
image = self.tan_triggs(image)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment