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

backend/processing/segmenter: Add a scalebar to each segmented object #358

Open
ethanjli opened this issue Jan 26, 2024 · 0 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@ethanjli
Copy link
Member

ethanjli commented Jan 26, 2024

Is your feature request related to a problem? Please describe.
Currently, all metadata is reported in units of pixels, and the pixel size calibration is not used to calculate any metadata fields (e.g. width, height, area, perimeter, or equivalent diameter) exported to EcoTaxa. This means that users have to do a mental calculation in order to estimate the actual size of an object.

Describe the solution you'd like
@fabienlombard has requested that the PlanktoScope software should add a scalebar as a length-calibration annotation to every segmented object image. This is also the behavior of Flowcam (e.g. as in https://ecotaxa.obs-vlfr.fr/prj/11559), which always appears to add a 100 um scalebar:
flowcam-example

I think this request makes a lot of sense, and I also think we should make it easy for a user to write a custom Python script which removes scalebars for subsequent processing (e.g. to compile into a mosaic). If we add a fixed-height padding to every segmented image (e.g. always 48 px at the top of the image, or always 48 px at the bottom of the image) and every corresponding segmentation mask, this would make it easy for a script to crop out the scalebar if needed. But the default for most users will be to just accept the existence of the scalebars everywhere, which seems reasonable to me.

Describe alternatives you've considered
One potential alternative instead of having a scale bar is to also calculate and export pixel-size-calibrated versions of the metadata fields (i.e. perform unit conversions from pixels or pixels^2 to um or um^2), but that would add complexity to the software and the traceability/correctness of any metadata values derived from calculations. @fabienlombard thinks we should discourage the calculation of derived values. I think, at the very least, if any derived values are to be computed, it is reasonable for us to say that it is entirely the user's responsibility to do those calculations and to ensure the correctness of whatever they do - and that we will not make any such calculations in the PlanktoScope software. I think it will be simpler for the PlanktoScope software to just add a scalebar instead of doing anything with unit conversions.

@ethanjli ethanjli added the enhancement New feature or request label Jan 26, 2024
@ethanjli ethanjli added this to the Backlog milestone Jan 26, 2024
@ethanjli ethanjli changed the title backend/processing/segmenter: Add a scalebar to each segmented object. backend/processing/segmenter: Add a scalebar to each segmented object Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant