-
Notifications
You must be signed in to change notification settings - Fork 549
Expand file tree
/
Copy pathconfidence_connected.cpp
More file actions
49 lines (43 loc) · 1.83 KB
/
confidence_connected.cpp
File metadata and controls
49 lines (43 loc) · 1.83 KB
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
/*******************************************************
* Copyright (c) 2019, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <af/array.h>
#include <af/dim4.hpp>
#include <af/image.h>
#include "error.hpp"
namespace af {
array confidenceCC(const array &in, const size_t num_seeds,
const unsigned *seedx, const unsigned *seedy,
const unsigned radius, const unsigned multiplier,
const int iter, const double segmentedValue) {
af::array xs(dim4(num_seeds), seedx);
af::array ys(dim4(num_seeds), seedy);
af_array temp = 0;
AF_THROW(af_confidence_cc(&temp, in.get(), xs.get(), ys.get(), radius,
multiplier, iter, segmentedValue));
return array(temp);
}
array confidenceCC(const array &in, const array &seeds, const unsigned radius,
const unsigned multiplier, const int iter,
const double segmentedValue) {
af::array xcoords = seeds.col(0);
af::array ycoords = seeds.col(1);
af_array temp = 0;
AF_THROW(af_confidence_cc(&temp, in.get(), xcoords.get(), ycoords.get(),
radius, multiplier, iter, segmentedValue));
return array(temp);
}
array confidenceCC(const array &in, const array &seedx, const array &seedy,
const unsigned radius, const unsigned multiplier,
const int iter, const double segmentedValue) {
af_array temp = 0;
AF_THROW(af_confidence_cc(&temp, in.get(), seedx.get(), seedy.get(), radius,
multiplier, iter, segmentedValue));
return array(temp);
}
} // namespace af