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

fix cv color conversions #1133

Merged
merged 1 commit into from
Jun 26, 2023
Merged

fix cv color conversions #1133

merged 1 commit into from
Jun 26, 2023

Conversation

Ezward
Copy link
Contributor

@Ezward Ezward commented Jun 24, 2023

  • several of the color conversions were not correctly returning the converted image; returning None instead. This caused a crash when they were used.
  • this commit fixes those and makes all color conversions similar in how they return that converted image
  • This also adds a new transform; a version of the trapezoid mask that takes values from the edges of the image like the crop transform does (rather than absoluted image coordinates as the pre-existing trapezoid transform does).

- several of the color conversions were not correctly returning
  the converted image; return None instead.
- this commit fixes those and makes all color conversions
  similar in how they return that converted image
- This also adds a new transform; a version of the trapezoid
  mask that takes values from the edges of the image like
  the crop transform does (rather than absoluted image coordinates
  as the pre-existing trapezoid transform does).
@Ezward Ezward requested a review from DocGarbanzo June 24, 2023 23:53
@Ezward Ezward self-assigned this Jun 24, 2023
Comment on lines +457 to +459
cv2.fillConvexPoly(mask,
np.array(points, dtype=np.int32),
self.fill)

Choose a reason for hiding this comment

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

👾

Suggested change
cv2.fillConvexPoly(mask,
np.array(points, dtype=np.int32),
self.fill)
cv2.fillConvexPoly(
mask,
np.array(points, dtype=np.int32),
self.fill
)
Suggested change
cv2.fillConvexPoly(mask,
np.array(points, dtype=np.int32),
self.fill)
cv2.fillConvexPoly(mask, np.array(points, dtype=np.int32), self.fill)

Copy link
Contributor

@DocGarbanzo DocGarbanzo left a comment

Choose a reason for hiding this comment

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

LGTM.

@Ezward Ezward merged commit 3dee532 into main Jun 26, 2023
@Ezward Ezward deleted the fix-cv-colorspace-transforms branch June 26, 2023 19:47
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.

3 participants