cp /workspace/scratch/matting.py /workspace/scratch/matting4.py; python - <<'PY'
p='/workspace/scratch/matting.py';s=open(p).read();start=s.index(' small=cv2.resize(ratio');end=s.index(' v=F-B;',start);s=s[:start]+''' sh=cv2.erode(ratio,np.ones((9,9),np.uint8))
 sh=cv2.GaussianBlur(sh,(3,3),.6)
 B=b*np.clip(sh,.25,1.0)
'''+s[end:];open(p,'w').write(s)
PY
OPENBLAS_NUM_THREADS=1 python /workspace/scratch/matting.py HH-1206
cat /workspace/input/page_plan.json; cat /workspace/input/catalogue_copy.json; cat /workspace/input/copy_amendments.md; cat /workspace/input/chart_reference.json; cat /workspace/input/quality_acceptance.md