(self, arange=None, stack=False)
| 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 |
no test coverage detected