soft-matter / pims

Python Image Sequence: Load video and sequential images in many formats with a simple, consistent interface.
http://soft-matter.github.io/pims/
Other
263 stars 67 forks source link

Tweak the pims.Frame IPython rich display repr #113

Open danielballan opened 10 years ago

danielballan commented 10 years ago

A Frame displays as a PNG image in the IPython notebook. We autoscale the brightness. We considered clipping the extreme values, which can sometimes reveal more detail, but we decided against that because it can also hide extremes that can be important in edge cases. Something like this might be a better solution:

https://gist.github.com/anonymous/4dae3df711df70117a27

h/t @nikhartman

danielballan commented 10 years ago

@jni Do you happen to know if scikit-image has settled on a good solution for autoscaling an image without wildly distorting it or hiding important features at the extremes?

danielballan commented 10 years ago

Note to self: http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_histograms/py_histogram_equalization/py_histogram_equalization.html

jni commented 10 years ago

@danielballan the short answer is no.

Long answer: application is everything. I think anything other than simple min/max scaling is playing with fire and best left to users.

If you display with a clear warning, here's a discussion about Clarity, a filter in the Camera+ app that gives very clear details with a high dynamic range: https://groups.google.com/d/msg/scikit-image/UYzenmYrJZM/vVxsd7qM5zoJ

danielballan commented 10 years ago

Agreed, it's playing with fire. Maybe our impulse not to mess with it was correct. I'll take a look at Clarity -- thanks.