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

How to handle uint8/[0,255] format HSI? #1599

Open
HaleySchuhl opened this issue Sep 17, 2024 · 2 comments
Open

How to handle uint8/[0,255] format HSI? #1599

HaleySchuhl opened this issue Sep 17, 2024 · 2 comments
Labels
enhancement Enhancements to existing features update Updates an existing feature/method

Comments

@HaleySchuhl
Copy link
Contributor

Start a discussion about anything you would like
So far plantcv has added support for a handful of different hyper/multispectral image formats (#972, #956, #781) and @rayn-alex brought up a formatting incompatibility that could make sense to handle automatically.

"It might make sense to introduce a cast to float, possibly already in read_data depending on the input data type. So the Spectral_data objects are always float32/0-1. The RAYN Vision System camera for example produces uint8/0-255 multispectral images and I need to convert to float32 and rescale them to 0-1 in my pcv workflows because otherwise the results do not make sense."

This sounds like a good argument to cast Spectral_data during read_data, or even inside _find_closest / other ideas ??

@HaleySchuhl HaleySchuhl added enhancement Enhancements to existing features update Updates an existing feature/method labels Sep 17, 2024
@rayn-alex
Copy link
Collaborator

I think it makes more sense in read_data because then all Spectral_data objects have the same array data type. Is there anything against that?

I guess the only argument against needless conversion is the floating-point error, but I guess it's negligible for these applications, right?

@rayn-alex
Copy link
Collaborator

Here is a sample image from the RVS Camera
sample_set.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements to existing features update Updates an existing feature/method
Projects
Status: New Issues
Development

No branches or pull requests

2 participants