-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeanShiftParallel.h
More file actions
30 lines (20 loc) · 922 Bytes
/
MeanShiftParallel.h
File metadata and controls
30 lines (20 loc) · 922 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
//
// Created by gioste.
//
#ifndef MEANSHIFTPARALLEL_H
#define MEANSHIFTPARALLEL_H
#include <opencv2/opencv.hpp>
#include <vector>
// NB la seguente struttura dati è una Structure of Arrays (SoA)
struct SoAData {
std::vector<float> r, g, b; // Componenti dei colori
};
// Funzione per convertire l'immagine da Array of Structures (AoS) a Structure of Arrays (SoA)
SoAData convertToSoA(const cv::Mat& image);
// Funzione per eseguire il Mean Shift parallelo su dati in formato SoA
void meanShift_parallel(const SoAData& data, SoAData& modes, float bandwidth, float epsilon);
// Funzione per ricostruire un'immagine OpenCV (cv::Mat) da dati in formato SoA
cv::Mat reconstructFromSoA(const SoAData& modes, int rows, int cols);
// Funzione per segmentare un'immagine in parallelo utilizzando SoA
cv::Mat segmentImage_parallel(const cv::Mat& image, float bandwidth, float epsilon);
#endif //MEANSHIFTPARALLEL_H