warpAffine+RotateRect 水平校正
using namespace std;
using namespace cv;
int main()
{
vector
glob(src_path, src_paths);
for (size_t m = 0; m < src_paths.size(); m++)
{
Mat src = imread(src_paths[m], 1);
Mat dst;
if (src.type() == CV_8UC1)
cvtColor(src, dst, COLOR_GRAY2BGR);
else
{
dst = src.clone();
cvtColor(src, src, COLOR_BGR2GRAY);
}
threshold(src, src, 90, 255,THRESH_BINARY);
vector
findContours(src, contours, RETR_EXT
共有 0 条评论