Init commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include <zcv.h>
|
||||
|
||||
void Test_CV() {
|
||||
cv::Mat img = ZCV::readImage("test.jpg");
|
||||
|
||||
cv::Mat gray = ZCV::ensureGray(img);
|
||||
cv::Mat edges = ZCV::canny(gray, 80, 160);
|
||||
cv::Mat closed = ZCV::morph(edges, ZCV::MorphType::Close, 5);
|
||||
|
||||
std::vector<ZCV::ContourInfo> contours = ZCV::findContoursInfo(closed, cv::RETR_EXTERNAL);
|
||||
cv::Mat vis = ZCV::drawContourInfos(img, contours, cv::Scalar(0, 255, 0), 2, true, true);
|
||||
|
||||
ZCV::saveImage("result.jpg", vis);
|
||||
}
|
||||
Reference in New Issue
Block a user