admin
2023-01-02 954ead41d9391bca28a3cc4f9592f73f25b3bbc8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
 
#ifndef  _IMGDIVIDE_DEFINED_
#define  _IMGDIVIDE_DEFINED_
#include <string>
#include<opencv2\opencv.hpp>
#define SIMPLE_SPACE 3
#define BLANK_COLOR_VALUE 10
 
 
#include "LogUtil.h"
 
 
 
 
class ImgDivider
{
public:
 
    //ÂúÊý¾ÝÐÐ
    static    bool isRowFull(cv::Mat img,int row);
 
    static    bool isRowFull(cv::Mat img, int row,int startCol,int endCol, int simple);
 
 
    static bool isRowFull(cv::Mat img, int row, int startCol, int endCol, int simple, int splitColorFrom, int splitColorTo);
 
    //¿ÕÊý¾ÝÐÐ
    static    bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol);
 
    static bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol, int simple);
 
    static bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol, int simple,int blankColorValue);
 
    static bool isRowEmpty(cv::Mat img, int row);
    //ÓÐÊý¾ÝÐÐ
    static bool rowHasData(cv::Mat img, int row);
 
    //ÂúÊý¾ÝÁÐ
    static bool isColFull(cv::Mat img, int col, int startRow = 0);
 
    static bool isColFull(cv::Mat img, int col, int startRow, int endRow, int simple);
 
    //¿ÕÊý¾ÝÁÐ
    static bool isColEmpty(cv::Mat img, int row);
 
    static bool isColEmpty(cv::Mat img, int col, int fromRow, int endRow);
 
    static bool isColEmpty(cv::Mat img, int col, int simple);
 
    static bool isColEmpty(cv::Mat img, int col, int fromRow, int endRow,int blankColorValue);
 
    //ÓÐÊý¾ÝÁÐ
    static bool colHasData(cv::Mat img, int row);
 
};
#endif