1 | initial version |
If you know that testing
is for sure a number, you can use stof
2 | No.2 Revision |
If you know that testing
is for sure a number, you can use stof. Because you have a vector (1x256), you can create a vector of floats (CV_32F) and then use the Mat constructor that is having as parameter the vector; or use the same syntax as you used: cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
3 | No.3 Revision |
If you know that testing
is for sure a number, you can use stof. Because you have a vector (1x256), you can create a vector of floats (CV_32F) and then use the Mat constructor that is having as parameter the vector; or use the same syntax as you used: used:cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
`cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
4 | No.4 Revision |
If you know that testing
is for sure a number, you can use stof. Because you have a vector (1x256), you can create a vector of floats (CV_32F) and then use the Mat constructor that is having as parameter the vector; or use the same syntax as you used:
`cv::Mat cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
5 | No.5 Revision |
If you know that testing
is for sure a number, you can use stof. Because you have a vector (1x256), you can create a vector of floats (CV_32F) and then use the Mat constructor that is having as parameter the vector; or use the same syntax as you used:
cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
better explanation:
std::vector<int> values;
for(int d=0;d<256;d++)
{
//testing += '0' + pixelValueArray[d];
values.push_back(stoi('0' + pixelValueArray[d], NULL, 2));
}
cv::Mat data(1,ATTRIBUTES,CV_32F,values.data());
6 | No.6 Revision |
If you know that testing
is for sure a number, you can use stof. Because you have a vector (1x256), you can create a vector of floats (CV_32F) and then use the Mat constructor that is having as parameter the vector; or use the same syntax as you used:
cv::Mat data(1,ATTRIBUTES,CV_32F,vecOfFloats.data());
better explanation:
std::vector<int> values;
for(int d=0;d<256;d++)
{
//testing += '0' + pixelValueArray[d];
values.push_back(stoi('0' + pixelValueArray[d], NULL, 2));
}
cv::Mat data(1,ATTRIBUTES,CV_32F,values.data());