pikapython/test/python/PikaCV/PikaCV_test6.py

10 lines
230 B
Python
Raw Normal View History

import PikaCV as cv
img = cv.Image()
img.read("test/assets/test.jpg")
cv.Converter.toRGB888(img)
thre = cv.Transforms.getOTSUthre(img)
print(thre)
cv.Transforms.setOTSU(img)
cv.Converter.toBMP(img)
img.write("test/out/test2.bmp")