You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ??
The text was updated successfully, but these errors were encountered:
Thank you @rayn-alex this is super helpful. And my apologies for my slower response. I would agree that handling various datatypes as soon as possible makes the most sense, and we can evaluate if the decimal accuracy has an impact practically on results.
How do you currently convert your images into a "plantcv friendly datatype" ?
spectral_data=readimage(filename=img_file, mode='envi')
spectral_data.array_data=spectral_data.array_data.astype("float32") # required for further calculationsifspectral_data.d_type==np.uint8: # only convert if data seems to be uint8spectral_data.array_data=spectral_data.array_data/255# convert 0-255 (orig.) to 0-1 range
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.
This sounds like a good argument to cast
Spectral_data
duringread_data
, or even inside_find_closest
/ other ideas ??The text was updated successfully, but these errors were encountered: