mirror of
http://CODE.RHODECODE.COM/u/O/O/O
synced 2024-11-23 00:23:34 +00:00
Compare commits
2 Commits
4b7867db0f
...
ea5d902c16
Author | SHA1 | Date | |
---|---|---|---|
ea5d902c16 | |||
b00e29b82a |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,81 @@
|
||||
import cv2,OpenEXR,Imath
|
||||
import numpy as ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ
|
||||
from edt import edt
|
||||
|
||||
ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ='ꓨИꟼ..𖣠⚪ᗱᗴᕤᕦᗩᙏⵙ𖣓✤ᔓᔕᗱᗴ✤⚪𔗢⚪🞋⚪𔗢⚪✤ᗱᗴᔓᔕ✤𖣓ⵙᙏᗩᕤᕦᗱᗴ⚪𖣠..PNG'
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꖴᙏᗩᕤᕦᗱᗴⵙ=cv2.imdecode(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.fromfile(ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ,ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.uint8),cv2.IMREAD_COLOR)
|
||||
ⵙᗱᗴᙁᗩᑐᑕᔓᔕ人ᗩᴥᕤᕦ〇O𖧷〇ↀᗱᗴ𖧷ᗱᗴᐱИNOᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕOИNᐱᗱᗴ𖧷ᗱᗴↀ〇𖧷O〇ᕤᕦᴥᗩ人ᔓᔕᑐᑕᗩᙁᗱᗴⵙ=cv2.cvtColor(ⵙᗱᗴᕤᕦᗩᙏꖴ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꖴᙏᗩᕤᕦᗱᗴⵙ,cv2.COLOR_BGR2GRAY)
|
||||
|
||||
ⵙИNᴥᑎ𖧷ᗱᗴᴥⵙ〇ⵙ〇ⵙᴥᗱᗴ𖧷ᑎᴥИNⵙ,ⵙↀᙁO옷ᔓᔕᗱᗴᴥ옷𖧷ⵙ〇ⵙ〇ⵙ𖧷옷ᴥᗱᗴᔓᔕ옷Oᙁↀⵙ=cv2.threshold(ⵙᗱᗴᙁᗩᑐᑕᔓᔕ人ᗩᴥᕤᕦ〇O𖧷〇ↀᗱᗴ𖧷ᗱᗴᐱИNOᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕOИNᐱᗱᗴ𖧷ᗱᗴↀ〇𖧷O〇ᕤᕦᴥᗩ人ᔓᔕᑐᑕᗩᙁᗱᗴⵙ,127,255,cv2.THRESH_BINARY)
|
||||
|
||||
ⵙᴥᗱᗴ8ᙏᑎИN〇ᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁ〇ИNᑎᙏ8ᗱᗴᴥⵙ,ⵙᔓᔕᙁᗱᗴᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕᗱᗴᙁᔓᔕⵙ,ⵙᔓᔕᑐᑕꖴ𖧷ᔓᔕꖴ𖧷ᗩ𖧷ᔓᔕ〇ᔓᔕᙁᗱᗴᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕᗱᗴᙁᔓᔕ〇ᔓᔕ𖧷ᗩ𖧷ꖴᔓᔕ𖧷ꖴᑐᑕᔓᔕⵙ,ⵙᔓᔕↀꖴOᴥ𖧷ИNᗱᗴᑐᑕ〇ᔓᔕᙁᗱᗴᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕᗱᗴᙁᔓᔕ〇ᑐᑕᗱᗴИN𖧷ᴥOꖴↀᔓᔕⵙ=cv2.connectedComponentsWithStats(ⵙↀᙁO옷ᔓᔕᗱᗴᴥ옷𖧷ⵙ〇ⵙ〇ⵙ𖧷옷ᴥᗱᗴᔓᔕ옷Oᙁↀⵙ)
|
||||
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.zeros_like(ⵙᔓᔕᙁᗱᗴᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕᗱᗴᙁᔓᔕⵙ)
|
||||
for i in range(1,ⵙᴥᗱᗴ8ᙏᑎИN〇ᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁ〇ИNᑎᙏ8ᗱᗴᴥⵙ):ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ[ⵙᔓᔕᙁᗱᗴᑐᑕ〇ᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴ〇ᑐᑕᗱᗴᙁᔓᔕⵙ==i]=i
|
||||
|
||||
ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ=edt(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ.astype(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.float32))
|
||||
|
||||
ⵙᔓᔕᗱᗴИNᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁИNᗱᗴᔓᔕⵙ='·'
|
||||
ⵙᴥO𖧷ᑐᑕᗩꗳⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙꗳᗩᑐᑕ𖧷Oᴥⵙ=2/4.793447 # 2/5.5625 # 1/27**1/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.cbrt(2)
|
||||
ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ,ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ=ⵙᗱᗴᕤᕦᗩᙏꖴ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꖴᙏᗩᕤᕦᗱᗴⵙ.shape[:2]
|
||||
ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ=int(max(ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ,ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ)*ⵙᴥO𖧷ᑐᑕᗩꗳⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙꗳᗩᑐᑕ𖧷Oᴥⵙ)
|
||||
ⵙↀᙁO옷ᔓᔕᗱᗴᴥ옷𖧷ⵙ𖧷ИNᑎOᑐᑕⵙᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁⵙᑐᑕOᑎИN𖧷ⵙ𖧷옷ᴥᗱᗴᔓᔕ옷Oᙁↀⵙ=min(ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ,ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ)*64
|
||||
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.zeros_like(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ,dtype=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.float32)
|
||||
|
||||
if ⵙᔓᔕᗱᗴИNᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁИNᗱᗴᔓᔕⵙ=='ⵔ':
|
||||
for i in range(1,ⵙᴥᗱᗴ8ᙏᑎИN〇ᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁ〇ИNᑎᙏ8ᗱᗴᴥⵙ):
|
||||
ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ=(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ==i)
|
||||
ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ᙁᗱᗴᑐᑕ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ᑐᑕᗱᗴᙁ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ=ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]
|
||||
ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ᙏᑎᙏꖴꕤᗩᙏ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ᔓᔕᙁᗱᗴᑐᑕ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ᑐᑕᗱᗴᙁᔓᔕ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ᙏᗩꕤꖴᙏᑎᙏ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.max(ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ᙁᗱᗴᑐᑕ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ᑐᑕᗱᗴᙁ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ)
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.clip(ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ᙁᗱᗴᑐᑕ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ᑐᑕᗱᗴᙁ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ,0,ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ)/ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ
|
||||
elif ⵙᔓᔕᗱᗴИNᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁИNᗱᗴᔓᔕⵙ=="·":
|
||||
for i in range(1,ⵙᴥᗱᗴ8ᙏᑎИN〇ᙁᗱᗴ8ᗩᙁⵙ〇ⵙ〇ⵙᙁᗩ8ᗱᗴᙁ〇ИNᑎᙏ8ᗱᗴᴥⵙ):
|
||||
ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ=(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ==i)
|
||||
if ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.sum(ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ)>ⵙↀᙁO옷ᔓᔕᗱᗴᴥ옷𖧷ⵙ𖧷ИNᑎOᑐᑕⵙᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁⵙᑐᑕOᑎИN𖧷ⵙ𖧷옷ᴥᗱᗴᔓᔕ옷Oᙁↀⵙ:
|
||||
ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ↀᗱᗴߦꖴᙁᑐᑕⵙ〇ⵙ〇ⵙᑐᑕᙁꖴߦᗱᗴↀ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.clip(ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.max(ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]),0,ⵙᴥO𖧷ᑐᑕᗩꗳⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀⵙ𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦⵙᙏᑎᙏꖴꕤᗩᙏⵙ〇ⵙ〇ⵙᙏᗩꕤꖴᙏᑎᙏⵙᕤᕦᴥᗩↀꖴᗱᗴИN𖧷ⵙↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙꗳᗩᑐᑕ𖧷Oᴥⵙ)
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]=cv2.normalize(ⵙᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇𖧷ИNᗱᗴꖴↀᗩᴥᕤᕦ〇ↀᗱᗴߦꖴᙁᑐᑕⵙ〇ⵙ〇ⵙᑐᑕᙁꖴߦᗱᗴↀ〇ᕤᕦᴥᗩↀꖴᗱᗴИN𖧷〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴⵙ[:,ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.newaxis],None,0,1,cv2.NORM_MINMAX).flatten()
|
||||
else:
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]=ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ]/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.max(ⵙᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ИNᗩᗱᗴↀꖴᙁᑐᑕᑎᗱᗴⵙ〇ⵙ〇ⵙᗱᗴᑎᑐᑕᙁꖴↀᗱᗴᗩИN〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏⵙ[ⵙ𐊌ᔓᔕᗩᙏⵙ〇ⵙ〇ⵙᙏᗩᔓᔕ𐊌ⵙ])
|
||||
|
||||
ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏ〇𖧷ꖴ8〇𓃎·ⵙ〇ⵙ〇ⵙ·𓃎〇8ꖴ𖧷〇ᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ=(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ*65535).astype(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.uint16)
|
||||
|
||||
def ⵙᴥꕤᗱᗴ〇ᗱᗴ𖧷ᗩᴥᗱᗴИNᗱᗴᕤᕦⵙ〇ⵙ〇ⵙᕤᕦᗱᗴИNᗱᗴᴥᗩ𖧷ᗱᗴ〇ᗱᗴꕤᴥⵙ(ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳⵙ〇ⵙ〇ⵙꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ,ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ):
|
||||
if ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.ndim==2:
|
||||
ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ,ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ=ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.shape
|
||||
ⵙᙁᗱᗴИNᗩ옷ᑐᑕ〇ᗩ옷ߦᙁᗩⵙ〇ⵙ〇ⵙᗩᙁߦ옷ᗩ〇ᑐᑕ옷ᗩИNᗱᗴᙁⵙ=ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.max(ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ)
|
||||
ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.stack((ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ,)*3+(ⵙᙁᗱᗴИNᗩ옷ᑐᑕ〇ᗩ옷ߦᙁᗩⵙ〇ⵙ〇ⵙᗩᙁߦ옷ᗩ〇ᑐᑕ옷ᗩИNᗱᗴᙁⵙ,),axis=-1)
|
||||
elif ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.ndim==3 and ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.shape[2]==4:
|
||||
ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ,ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ,ⵙᔓᔕᙁᗱᗴИNᗩ옷ᑐᑕⵙ〇ⵙ〇ⵙᑐᑕ옷ᗩИNᗱᗴᙁᔓᔕⵙ=ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.shape
|
||||
else:
|
||||
raise ValueError("")
|
||||
|
||||
ⵙᗱᗴߦ人𖧷〇ᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁ〇𖧷人ߦᗱᗴⵙ=Imath.PixelType(Imath.PixelType.FLOAT)
|
||||
ⵙᴥᗱᗴↀᗩᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴᗩↀᗱᗴᴥⵙ=OpenEXR.Header(ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ,ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ)
|
||||
|
||||
ⵙᴥᗱᗴↀᗩᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴᗩↀᗱᗴᴥⵙ['ⵙᔓᔕᙁᗱᗴИNᗩ옷ᑐᑕⵙ〇ⵙ〇ⵙᑐᑕ옷ᗩИNᗱᗴᙁᔓᔕⵙ']={
|
||||
'R':Imath.Channel(ⵙᗱᗴߦ人𖧷〇ᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁ〇𖧷人ߦᗱᗴⵙ),
|
||||
'G':Imath.Channel(ⵙᗱᗴߦ人𖧷〇ᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁ〇𖧷人ߦᗱᗴⵙ),
|
||||
'B':Imath.Channel(ⵙᗱᗴߦ人𖧷〇ᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁ〇𖧷人ߦᗱᗴⵙ),
|
||||
'A':Imath.Channel(ⵙᗱᗴߦ人𖧷〇ᙁᗱᗴꕤꖴߦⵙ〇ⵙ〇ⵙߦꖴꕤᗱᗴᙁ〇𖧷人ߦᗱᗴⵙ)
|
||||
}
|
||||
|
||||
ⵙᗱᗴᙁꖴꗳ〇𖧷ᑎߦ𖧷ᑎOⵙ〇ⵙ〇ⵙOᑎ𖧷ߦᑎ𖧷〇ꗳꖴᙁᗱᗴⵙ=OpenEXR.OutputFile(ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳⵙ〇ⵙ〇ⵙꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ.encode('utf-8'),ⵙᴥᗱᗴↀᗩᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴᗩↀᗱᗴᴥⵙ)
|
||||
|
||||
ⵙᗩ𖧷ᗩↀ〇𖧷ᗩᙁꗳⵙ〇ⵙ〇ⵙꗳᙁᗩ𖧷〇ↀᗩ𖧷ᗩⵙ=ⵙᗩ𖧷ᗩↀⵙ〇ⵙ〇ⵙↀᗩ𖧷ᗩⵙ.reshape(ⵙ𖧷옷ᕤᕦꖴᗱᗴ옷ⵙ〇ⵙ〇ⵙ옷ᗱᗴꖴᕤᕦ옷𖧷ⵙ*ⵙ옷𖧷ↀꖴᗯⵙ〇ⵙ〇ⵙᗯꖴↀ𖧷옷ⵙ,4)
|
||||
|
||||
ⵙᗱᗴᙁꖴꗳ〇𖧷ᑎߦ𖧷ᑎOⵙ〇ⵙ〇ⵙOᑎ𖧷ߦᑎ𖧷〇ꗳꖴᙁᗱᗴⵙ.writePixels({
|
||||
'R':ⵙᗩ𖧷ᗩↀ〇𖧷ᗩᙁꗳⵙ〇ⵙ〇ⵙꗳᙁᗩ𖧷〇ↀᗩ𖧷ᗩⵙ[:,0].tobytes(),
|
||||
'G':ⵙᗩ𖧷ᗩↀ〇𖧷ᗩᙁꗳⵙ〇ⵙ〇ⵙꗳᙁᗩ𖧷〇ↀᗩ𖧷ᗩⵙ[:,1].tobytes(),
|
||||
'B':ⵙᗩ𖧷ᗩↀ〇𖧷ᗩᙁꗳⵙ〇ⵙ〇ⵙꗳᙁᗩ𖧷〇ↀᗩ𖧷ᗩⵙ[:,2].tobytes(),
|
||||
'A':ⵙᗩ𖧷ᗩↀ〇𖧷ᗩᙁꗳⵙ〇ⵙ〇ⵙꗳᙁᗩ𖧷〇ↀᗩ𖧷ᗩⵙ[:,3].tobytes()
|
||||
})
|
||||
|
||||
ⵙᴥꕤᗱᗴ〇ᗱᗴ𖧷ᗩᴥᗱᗴИNᗱᗴᕤᕦⵙ〇ⵙ〇ⵙᕤᕦᗱᗴИNᗱᗴᴥᗩ𖧷ᗱᗴ〇ᗱᗴꕤᴥⵙ(f"ЯXƎ.𖣠⚪✤ИNᗱᗴⵙↀᗩᴥᕤᕦ𖣓✤ⵙ⚭𖣓꞉ⵈ⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪ⵈ꞉𖣓⚭ⵙ✤𖣓ᕤᕦᴥᗩↀⵙᗱᗴИN✤⚪𖣠.EXR",1-ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ)
|
||||
ⵙᴥꕤᗱᗴ〇ᗱᗴ𖧷ᗩᴥᗱᗴИNᗱᗴᕤᕦⵙ〇ⵙ〇ⵙᕤᕦᗱᗴИNᗱᗴᴥᗩ𖧷ᗱᗴ〇ᗱᗴꕤᴥⵙ(f"ЯXƎ.𖣠⚪ᔓᔕᙁᗱᗴᑐᑕ𖣓ↀᗱᗴᙁᗱᗴ⚭ᗩᙁ𖣓ᴥⓄᙁⓄᑐᑕ⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪ᑐᑕⓄᙁⓄᴥ𖣓ᙁᗩ⚭ᗱᗴᙁᗱᗴↀ𖣓ᑐᑕᗱᗴᙁᔓᔕ⚪𖣠.EXR",ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.concatenate([(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.max(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ)).astype(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.float32)],axis=-1))
|
||||
|
||||
cv2.imencode('.png',cv2.normalize(ⵙↀᙁO옷ᔓᔕᗱᗴᴥ옷𖧷ⵙ〇ⵙ〇ⵙ𖧷옷ᴥᗱᗴᔓᔕ옷Oᙁↀⵙ,None,0,255,cv2.NORM_MINMAX))[1].tofile(f"ꓨИꟼ.𖣠⚪ↀᙁⓄ옷ᔓᔕᗱᗴᴥ옷✤⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪✤옷ᴥᗱᗴᔓᔕ옷Ⓞᙁↀ⚪𖣠.PNG")
|
||||
cv2.imencode('.png',cv2.normalize(255-ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ*255,None,0,255,cv2.NORM_MINMAX).astype(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.uint8))[1].tofile(f"ꓨИꟼ.𖣠⚪✤ИNᗱᗴⵙↀᗩᴥᕤᕦ𖣓✤ⵙ⚭𖣓❋⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪❋𖣓⚭ⵙ✤𖣓ᕤᕦᴥᗩↀⵙᗱᗴИN✤⚪𖣠.PNG")
|
||||
cv2.imencode('.png',65535-ⵙᗱᗴᕤᕦᗩᙏꖴ〇ᙏᴥOꗳᔓᔕИNᗩᴥ𖧷〇ᗱᗴᑐᑕИNᗩ𖧷ᔓᔕꖴↀ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏ〇𖧷ꖴ8〇𓃎·ⵙ〇ⵙ〇ⵙ·𓃎〇8ꖴ𖧷〇ᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ↀꖴᔓᔕ𖧷ᗩИNᑐᑕᗱᗴ〇𖧷ᴥᗩИNᔓᔕꗳOᴥᙏ〇ꖴᙏᗩᕤᕦᗱᗴⵙ)[1].tofile(f"ꓨИꟼ.𖣠⚪✤ИNᗱᗴⵙↀᗩᴥᕤᕦ𖣓✤ⵙ⚭𖣓⠿·⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪·⠿𖣓⚭ⵙ✤𖣓ᕤᕦᴥᗩↀⵙᗱᗴИN✤⚪𖣠.PNG")
|
||||
cv2.imencode('.png',cv2.normalize(ⵙᗱᗴᕤᕦᗩᙏꖴ〇ↀᗱᗴᙁᗱᗴ8ᗩᙁ〇ᗱᗴᙁߦꖴ𖧷ᙁᑎᙏⵙ〇ⵙ〇ⵙᙏᑎᙁ𖧷ꖴߦᙁᗱᗴ〇ᙁᗩ8ᗱᗴᙁᗱᗴↀ〇ꖴᙏᗩᕤᕦᗱᗴⵙ,None,0,255,cv2.NORM_MINMAX).astype(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.uint8))[1].tofile(f"ꓨИꟼ.𖣠⚪ᔓᔕᙁᗱᗴᑐᑕ𖣓ↀᗱᗴᙁᗱᗴ⚭ᗩᙁ𖣓ᴥⓄᙁⓄᑐᑕ⚪⊚⚪{ⵙᗱᗴᙏᗩИN〇ᗱᗴᙁꖴꗳ〇𖧷ᑎߦИNꖴⵙ〇ⵙ〇ⵙꖴИNߦᑎ𖧷〇ꗳꖴᙁᗱᗴ〇ИNᗩᙏᗱᗴⵙ}⚪⊚⚪ᑐᑕⓄᙁⓄᴥ𖣓ᙁᗩ⚭ᗱᗴᙁᗱᗴↀ𖣓ᑐᑕᗱᗴᙁᔓᔕ⚪𖣠.PNG")
|
||||
exit()
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user