Not satisfying due to zero offset
This commit is contained in:
parent
c287d5f0ef
commit
92ede944c7
@ -16,10 +16,11 @@ def randomImage(scale):
|
||||
prnu = randomImage(scale = 1)
|
||||
|
||||
images = [randomImage(scale = 10) + prnu for _ in range(10)]
|
||||
allImages = [prnu] + images
|
||||
|
||||
def toPilImage(npArray):
|
||||
nonNegativeArray = npArray - np.min(npArray)
|
||||
nonNegativeArray = np.round(255 * nonNegativeArray / np.max(nonNegativeArray))
|
||||
nonNegativeArray = npArray - np.min(allImages)
|
||||
nonNegativeArray = np.round(255 * nonNegativeArray / np.max(allImages))
|
||||
return Image.fromarray(np.uint8(nonNegativeArray))
|
||||
|
||||
toPilImage(prnu).show()
|
||||
|
Loading…
Reference in New Issue
Block a user