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

Function like

imagepy/menus/Image/Adjust/histogram_plgs.py:12–21  ·  view source on GitHub ↗
(hist1, hist2)

Source from the content-addressed store, hash-verified

10from imagepy.core.manager import ImageManager
11
12def like(hist1, hist2):
13 hist1 = np.cumsum(hist1)/hist1.sum()
14 hist2 = np.cumsum(hist2)/hist2.sum()
15 hist = np.zeros(256, dtype=np.uint8)
16 i1, i2, s = 0, 0, 0
17 while i2<256:
18 while i1<256 and hist2[i2]>hist1[i1]:i1+=1
19 hist[i2] = i1
20 i2+=1
21 return hist
22
23def match(img1, img2):
24 if img1.ndim == 2:

Callers 2

matchFunction · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected