File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/react-native-executorch/common/rnexecutorch/data_processing Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ std::vector<float> convertColorMatToVector(const cv::Mat &mat) {
23
23
24
24
std::vector<float > convertColorMatToVector (const cv::Mat &mat, cv::Scalar mean,
25
25
cv::Scalar variance) {
26
- constexpr auto numChannels = 3 ;
26
+ constexpr size_t numChannels = 3 ;
27
27
constexpr auto maxPixelValueFloat = 255 .0F ;
28
28
29
29
int pixelCount = mat.cols * mat.rows ;
30
30
std::vector<float > v (pixelCount * numChannels, 0 .0F );
31
31
32
32
// rescale to pixels values in matrix
33
33
#pragma unroll
34
- for (int i = 0 ; i < numChannels; ++i) {
34
+ for (size_t i = 0 ; i < numChannels; ++i) {
35
35
mean[i] *= maxPixelValueFloat;
36
36
variance[i] *= maxPixelValueFloat;
37
37
}
You can’t perform that action at this time.
0 commit comments