2017-03-12から1日間の記事一覧

BounceBall#02 OpenCVで四角形を検出する その2

前回、カメラ画像を2値化しました。今回は2値化した画像から四角形の座標を求めます。 輪郭を取得する 2値化した際、白になった領域の輪郭を取得します。 List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); Mat hierarchy = new Mat(); Imgproc.findContours(tempMat, conto</matofpoint></matofpoint>…