Skip to content

Doc clarification: BGR expected for HSV custom range #983

Answered by nfahlgren
ajstewart asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ajstewart, PlantCV primarily uses OpenCV, so our default handling of RGB images is BGR. When we use another tools (e.g. scikit-image) we convert between BGR->RGB->BGR in the backend when needed. But you are correct, pcv.threshold.custom_range requires a BGR image.

In the documentation we refer to color images as RGB because that is the terminology most people are familiar with. Since most users use pcv.readimage they are working with BGR images without necessarily realizing they are. Since you loaded an image with another tool (which other users may also do), we should document a procedure for converting images from scikit-image, imageio, etc. into OpenCV/PlantCV compatible images.

We…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ajstewart
Comment options

Answer selected by ajstewart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants