mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
imlib/filter: Fix offset argument being truncated.
This commit is contained in:
parent
f3cdeb4feb
commit
b09dbbdd47
@ -1239,7 +1239,7 @@ void imlib_morph(image_t *img,
|
||||
const int ksize,
|
||||
const int *krn,
|
||||
const float m,
|
||||
const int b,
|
||||
const float b,
|
||||
bool threshold,
|
||||
int offset,
|
||||
bool invert,
|
||||
@ -1250,7 +1250,7 @@ void imlib_morph(image_t *img,
|
||||
buf.h = brows;
|
||||
buf.pixfmt = img->pixfmt;
|
||||
const int32_t m_int = fast_roundf(65536 * m);
|
||||
const int32_t b_int = b << 16;
|
||||
const int32_t b_int = fast_roundf(65536 * b);
|
||||
invert = invert ? 1 : 0; // ensure binary
|
||||
|
||||
switch (img->pixfmt) {
|
||||
|
||||
@ -1402,7 +1402,7 @@ void imlib_morph(image_t *img,
|
||||
const int ksize,
|
||||
const int *krn,
|
||||
const float m,
|
||||
const int b,
|
||||
const float b,
|
||||
bool threshold,
|
||||
int offset,
|
||||
bool invert,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user