1 | initial version |
what is your labelsArray ? (if it is an int[] or similar, you cannot simpy change the type flag)
2 | No.2 Revision |
what is your labelsArray ? (if it is an int[] or similar, you cannot simpy change the type flag)
maybe you need 2 steps:
cv::Mat labelsMat(labels.size(), 1, CV_32S, labelsArray); // assuming, labelsArray is int[]
labelsMat.convertTo(labelsMat, CV_32F); // proper float Mat now.
3 | No.3 Revision |
what is your labelsArray ? (if it is an int[] or similar, you cannot simpy change the type flag)
maybe i think, you need 2 steps:
cv::Mat labelsMat(labels.size(), 1, CV_32S, labelsArray); // assuming, labelsArray is int[]
labelsMat.convertTo(labelsMat, CV_32F); // proper float Mat now.