Skip to content

Commit

Permalink
CV:Bugfix: Fix bug for filter
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying committed Sep 12, 2024
1 parent 1effb0c commit 7940973
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/cv/source/imgproc/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ static VARP formatOutput(VARP src, halide_type_t type) {
if (channel == 1) {
squeeze_dims.push_back(-1);
}
if (!squeeze_dims.empty()) {
src = _Squeeze(src, squeeze_dims);
}
if (type == halide_type_of<uint8_t>()) {
src = _Minimum(src, _Scalar<float>(255));
src = _Maximum(src, _Scalar<float>(0));
Expand Down

0 comments on commit 7940973

Please sign in to comment.