2021-12-25から1日間の記事一覧

kotlin opencvでkmeans

fun main() { val img = imread("yutaka.png", -1) val channels = MatVector() split(img, channels) val alpha = channels[3] val rgb_img = Mat() cvtColor(img, rgb_img, COLOR_BGRA2BGR) val samples = rgb_img.reshape(1, img.rows() * img.cols()) va…