A few changes to comply with upstream requirements for merge.
-Change input/output order from (out Labeled, in Image) -> (in Image, Out Labeled) and convert to Input/OutputArrays in the process. -Adopt OutputArray for statistics export so that the algorithm is "wrapper friendly" and not requiring a new struct in language bindings at the expense of using doubles for everything and slowing statistics computation down..
This commit is contained in:
@@ -12,7 +12,7 @@ static void on_trackbar(int, void*)
|
||||
{
|
||||
Mat bw = threshval < 128 ? (img < threshval) : (img > threshval);
|
||||
Mat labelImage(img.size(), CV_32S);
|
||||
uint64_t nLabels = connectedComponents(labelImage, bw, 8);
|
||||
int nLabels = connectedComponents(bw, labelImage, 8);
|
||||
Vec3b colors[nLabels];
|
||||
colors[0] = Vec3b(0, 0, 0);//background
|
||||
for(int label = 1; label < nLabels; ++label){
|
||||
|
Reference in New Issue
Block a user