MCPcopy Create free account
hub / github.com/Image-Py/imagepy / histogram

Method histogram

imagepy/core/wraper/imageplus.py:113–121  ·  view source on GitHub ↗
(self, arange=None, stack=False)

Source from the content-addressed store, hash-verified

111 else : self.imgs[self.cur][:] = self.snap
112
113 def histogram(self, arange=None, stack=False):
114 if arange == None: arange=self.range
115 if not stack:
116 return np.histogram(self.img, np.linspace(arange[0], arange[1], 257))[0]
117 # if stack
118 hists = []
119 for i in self.imgs:
120 hists.append(np.histogram(i, np.linspace(arange[0], arange[1], 257))[0])
121 return np.array(hists).sum(axis=0)
122
123 def lookup(self, img=None):
124 if img is None: img = self.img

Callers 15

on_applyMethod · 0.80
on_clearMethod · 0.80
on_resetMethod · 0.80
on_invertMethod · 0.80
on_8bitMethod · 0.80
on_minmaxMethod · 0.80
on_sliceMethod · 0.80
on_stackMethod · 0.80
runMethod · 0.80
loadMethod · 0.80
matchFunction · 0.80
runMethod · 0.80

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected