-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArea_Search.h
More file actions
36 lines (31 loc) · 897 Bytes
/
Area_Search.h
File metadata and controls
36 lines (31 loc) · 897 Bytes
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
//
// Created by Hyper on 02/12/2023.
//
#ifndef OPENCV_AREA_SEARCH_H
#define OPENCV_AREA_SEARCH_H
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2\imgproc\types_c.h>
#include <iostream>
#include "poisson.h"
using namespace std;
using namespace cv;
class Area
{
int number;
int* area_list; //存储每个区域的面积
int* area_size; //面积升序排列
vector<int> scope; //存储指定范围的区域
public:
Area(const Mat& markers);
~Area();
int getAreaNumber() { return number; }
void heapify(int len, int i);
void heapSort();
bool search();
void mark(const Mat& markers, Mat& filled, const Vector2 samples[]);
Mat HuffmanCoding();
};
vector<Vec3b> highlightColorLab(int total);
void swap(int* a, int* b);
#endif //OPENCV_AREA_SEARCH_H