mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-09 11:33:41 +08:00
added histograms to fancy imshow and colormixer.
Unfortunately im suffering from circular references when the window is initializing. It doesnt crash, but it throws a few exceptions... A refactor is in order.
This commit is contained in:
@@ -339,4 +339,23 @@ class ColorMixer(object):
|
||||
|
||||
'''
|
||||
R, G, B = _colormixer.py_hsv_2_rgb(H, S, V)
|
||||
return (R, G, B)
|
||||
return (R, G, B)
|
||||
|
||||
def histograms(self, nbins):
|
||||
'''Calculate the channel histograms of the current image.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
nbins : int
|
||||
The number of bins.
|
||||
|
||||
Returns
|
||||
-------
|
||||
out : (rcounts, gcounts, bcounts, vcounts)
|
||||
The binned histograms of the RGB channels and grayscale intensity.
|
||||
|
||||
This is a NAIVE histogram routine, meant primarily for fast display.
|
||||
|
||||
'''
|
||||
|
||||
return _colormixer.histograms(self.img, nbins)
|
||||
Reference in New Issue
Block a user