Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #pragma once
- #include "Algoritm.h"
- #include <opencv2/opencv.hpp>
- #include <iostream>
- #define NUMBER_REAL_FIGURE 6
- using namespace std;
- using namespace cv;
- #define FRAME_SIZE_X (8) // вынести
- #define FRAME_SIZE_Y (6) // вынести
- typedef struct {
- unsigned int hMin, hMax, sMin, sMax, vMin, vMax;
- }cv_figure_t;
- const cv_figure_t AllRealFigures[NUMBER_REAL_FIGURE] = {
- { 18, 28, 92, 255, 0, 255 },
- { 0, 15, 100, 255, 0, 255 },
- { 75, 127, 35, 255, 37, 255 },
- { 50, 65, 100, 255, 0, 255 },
- { 160, 188, 135, 255, 0, 155 },
- { 85, 115, 85, 255, 0, 255 }
- };
- const cv_figure_t AllFiguresHoles[NUMBER_REAL_FIGURE] = {
- { 15, 30, 110, 255, 95, 140 },
- { 0, 20, 145, 255, 0, 255 },
- { 110, 123, 85, 145, 0, 255 },
- { 58, 81, 95, 255, 0, 255 },
- { 160, 188, 150, 255, 0, 255 },
- { 100, 120, 135, 255, 0, 255 }
- };
- const cv_figure_t AllFiguresInFrame[NUMBER_REAL_FIGURE] = {
- { 15, 30, 90, 255, 0, 255 },
- { 0, 20, 100, 255, 0, 255 },
- { 100, 255, 50, 255, 0, 255 },
- { 44, 70, 110, 255, 0, 255 },
- { 170, 5, 90, 255, 0, 255 },
- { 100, 120, 60, 255, 0, 255 }
- };
- const cv_figure_t AllFiguresInStack[NUMBER_REAL_FIGURE] = {
- { 18, 28, 92, 255, 0, 255 },
- { 5, 15, 100, 255, 0, 255 },
- { 75, 127, 35, 85, 37, 255 },
- { 50, 65, 100, 255, 0, 255 },
- { 170, 5, 135, 255, 0, 255 },
- { 85, 115, 85, 255, 70, 120 }
- };
- typedef int frame_t[FRAME_SIZE_X][FRAME_SIZE_Y]; // вынести
- const int SupportSideLengthFigure[NUMBER_REAL_FIGURE] = { 40, 55, 55, 40, 40, 55 };
- #define ROBOTOCV_RAMKA 1
- #define ROBOTOCV_STACK 0
- void CalibrationChessboard(Mat img);
- void TestPhoto(char *name);
- figure_t GetFigure(Mat img, Rect *rectFigure);
- // GetFigureFrom(Mat img, const cv_figure_t *AllMasc, int type) замененна на:
- figure_t GetFigureFromStack(Mat img);
- figure_t GetFigureFromFrame(Mat img); //нужно проверить
- //
- Point GetHole(Mat img_start, figure_t figure, Rect rectFigure);
- Point getCenter(Mat img, figure_t figure);
- int AngFigure(Mat img, figure_t figure, double *ang);
- int BuseFrame(Mat img, frame_t frame);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement