-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpoisson.h
More file actions
29 lines (24 loc) · 848 Bytes
/
poisson.h
File metadata and controls
29 lines (24 loc) · 848 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
//
// Created by Hyper on 27/09/2023.
//
#ifndef OPENCV_POISSON_H
#define OPENCV_POISSON_H
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/utils/logger.hpp>
#include <cstdio> // 标准输入/输出函数
#include <cmath> // 数学函数
#include <cstdlib> // 通用实用程序库
#include <iostream> // 用于C++的输入/输出流
#include <random> // 随机数生成
#include "poisson.h"
typedef struct {
float x;
float y;
} Vector2;
bool check_collision(Vector2 p, int index, int **grid, Vector2 samples[]);
int poisson_disk_sample(int desired_samples, int **grid, Vector2 samples[]);
int findPoint(cv::Mat marks, Vector2 samples[], int* num_samples);
#endif //OPENCV_POISSON_H