mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1087 from kwagyeman/kwabena/fix_fltmin
Fix the use of FLT_MIN which is not the actual min, -FLT_MAX is
This commit is contained in:
commit
3879a34f81
@ -200,7 +200,7 @@ float fast_powf(float a, float b)
|
||||
|
||||
void fast_get_min_max(float *data, size_t data_len, float *p_min, float *p_max)
|
||||
{
|
||||
float min = FLT_MAX, max = FLT_MIN;
|
||||
float min = FLT_MAX, max = -FLT_MAX;
|
||||
|
||||
for (size_t i = 0; i < data_len; i++) {
|
||||
float temp = data[i];
|
||||
|
||||
@ -129,7 +129,7 @@ void imlib_get_similarity(image_t *img, const char *path, image_t *other, int sc
|
||||
state.similarity_sum = 0.0f;
|
||||
state.similarity_sum_2 = 0.0f;
|
||||
state.similarity_min = FLT_MAX;
|
||||
state.similarity_max = FLT_MIN;
|
||||
state.similarity_max = -FLT_MAX;
|
||||
state.lines_processed = 0;
|
||||
|
||||
imlib_image_operation(img, path, other, scalar, imlib_similarity_line_op, &state);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user