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

threshold.custom_range outputs and CMYK #1604

Open
annacasto opened this issue Sep 30, 2024 · 0 comments
Open

threshold.custom_range outputs and CMYK #1604

annacasto opened this issue Sep 30, 2024 · 0 comments
Labels
help wanted Request help

Comments

@annacasto
Copy link
Contributor

Describe the bug
When we used pcv.threshold.custom_range and only defined one output (I think it's expecting 2), it didn't give an error, but it returns a tuple that you then can't use as a mask downstream. It's obviously not how the function is supposed to be used, but it was not intuitive that there was no error but the output of custom_range wasn't useable as a mask.
custom_range also doesn't currently support CMYK colorspaces.

To Reproduce

  1. Read in a grayscale image.
  2. Convert to V channel in HSV colorspace.
  3. Threshold using threshold.custom_range but only define one output.
  4. Printing type(mask) shows "tuple" and there is no error about expecting 2 outputs.

Expected behavior
I think generally pcv functions throw an error if a user mistakenly defines the wrong number of outputs for a function.

Local environment (please complete the following information):

  • OS: macOS
  • Environment: conda
  • PlantCV Version 4.3.2

Additional context
Add any other context about the problem here.

@annacasto annacasto added the help wanted Request help label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Request help
Projects
None yet
Development

No branches or pull requests

1 participant