-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbib.h
127 lines (82 loc) · 4.12 KB
/
bib.h
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/// \brief Biblioteca de funções de processamento de imagens
/// \author Pedro Silva
/// \date 2023
/// \bug
/// \warning
/// \todo
#include "vc.h"
#include <stdio.h>
//• Construa uma função que calcule o negativo de uma imagem Gray.
int vc_gray_negative(IVC *srcdst);
//• Construa uma função que calcule o negativo de uma imagem RGB.
int vc_rgb_negative(IVC *srcdst);
// Converter RGB para HSV
int vc_rgb_to_hsv(IVC *srcdst);
int vc_rgb_to_hsv2(IVC *srcdst);
int vc_rgb_to_gray(IVC *src, IVC *dst);
int vc_hsv_segmentation(IVC *src, int hmin, int hmax, int smin,
int smax, int vmin, int vmax);
int subtrair(IVC *imagem1, IVC *imagem2, IVC *destino);
int vc_scale_gray_to_rgb(IVC* src, IVC* dst);
int vc_gray_to_binary(IVC *srcdst, IVC *dst, int threshold);
int vc_gray_to_binary_global_mean (IVC *srcdst, IVC *dst);
int vc_gray_to_binary_midpoint(IVC *srcdst, IVC *dst, int vizinhos );
int vc_gray_to_binary_Bersen(IVC *src, IVC *dst, int kernel, int c);
int vc_gray_to_binary_Niblack(IVC *src, IVC *dst, int kernel, float k);
int vc_binary_erode(IVC *src, IVC *dst, int kernel);
int vc_binary_dilate(IVC *src, IVC *dst, int kernel);
int vc_binary_open(IVC *src, IVC *dst, int kernelE, int kernelD);
int vc_binary_close(IVC *src, IVC *dst, int kernelE, int kernelD);
int vc_gray_erode(IVC *src, IVC *dst, int kernel);
int vc_gray_dilate(IVC *src, IVC *dst, int kernel);
int vc_binary_sub(IVC *imagem1, IVC *imagem2, IVC *destino);
#pragma region labelling
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ESTRUTURA DE UM BLOB (OBJECTO)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
typedef struct {
int x, y, width, height; // Caixa Delimitadora (Bounding Box)
int area; // �rea
int xc, yc; // Centro-de-massa
int perimeter; // Per�metro
int label; // Etiqueta
int valor;
int primeiro;
int segundo;
int terceiro;
int ultimaCor;
} OVC;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// PROT�TIPOS DE FUN��ES
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OVC* vc_binary_blob_labelling(IVC *src, IVC *dst, int *nlabels);
int vc_binary_blob_info(IVC *src, OVC *blobs, int nblobs);
// feita por mim
int vc_cores_labels(IVC *src, IVC *dst, int nblobs, OVC *blobs);
int vc_bin_labels(IVC *src, IVC *dst, int nblobs, OVC *blobs, int detalhes);
#pragma endregion
int vc_3chanels_to_1 (IVC *src, IVC *dst);
int vc_draw_bounding_box(IVC *src, OVC *blobs, int nblobs, int margemX, int margemY, int frame, int *contador);
int vc_draw_bounding_box_RGB(IVC *src, OVC *blobs, int nblobs, int margemX, int margemY, int red, int green, int blue);
int vc_draw_center_of_mass(IVC *src, OVC *blobs, int nblobs, int tamanho_alvo, int cor);
int vc_draw_center_of_mass_RGB(IVC *src, OVC *blobs, int nblobs, int tamanho_alvo, int cor, int red, int green, int blue);
int contagemPixeisSup1Inf255(IVC *src, int min, int max);// mhe
int vc_gray_histogram_show(IVC *src, IVC *dst);
int vc_gray_histogram_equalization(IVC *src, IVC *dst);
int vc_hsv_to_rgb(IVC *srcdst);
#pragma region contornos
int vc_gray_edge_prewitt(IVC *src, IVC *dst, float th);
#pragma endregion
int vc_hsv_segmentationmetade(IVC *src, int hmin, int hmax, int smin,
int smax, int vmin, int vmax);
int vc_hsv_segmentation_retornaImag(IVC *src, IVC *dst ,int hmin, int hmax, int smin,
int smax, int vmin, int vmax);
int vc_binary_erodeCentro(IVC *src, IVC *dst, int kernel);
int vc_binary_dilateCentro(IVC *src, IVC *dst, int kernel);
OVC *vc_binary_blob_labellingTeste(IVC *src, IVC *dst, int *nlabels);
int vc_bin_labelsTeste(IVC *src, IVC *dst, int nblobs, OVC *blobs, int detalhes);
int vc_binary_blob_infoTeste(IVC *src, OVC *blobs, int nblobs);
int vc_draw_bounding_boxTeste(IVC *src, OVC *blobs, int nblobs, int margemX, int margemY);
int vc_analise_cores(OVC *blobs, int i, IVC *src, int x );
void ValoresRgb_to_hsv(unsigned char red, unsigned char green, unsigned char blue, float *h, float *s, float *v);
int vc_cor_encontrada(OVC *blobs, int i, int cor);