Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 26, 2024
1 parent 5f309f8 commit 6764334
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef AUTOWARE_TENSORRT_YOLOX__UTILS_HPP_
#define AUTOWARE_TENSORRT_YOLOX__UTILS_HPP_
#ifndef AUTOWARE__TENSORRT_YOLOX__UTILS_HPP_
#define AUTOWARE__TENSORRT_YOLOX__UTILS_HPP_
#include <opencv2/opencv.hpp>


namespace autoware::tensorrt_yolox
{
std::vector<std::pair<uint8_t, int>> runLengthEncoder(const cv::Mat & mask);
cv::Mat runLengthDecoder(const std::vector<uint8_t> & rle_data, const int rows, const int cols);
} // namespace autoware::tensorrt_yolox
std::vector<std::pair<uint8_t, int>> runLengthEncoder(const cv::Mat & mask);
cv::Mat runLengthDecoder(const std::vector<uint8_t> & rle_data, const int rows, const int cols);
} // namespace autoware::tensorrt_yolox

#endif //AUTOWARE_TENSORRT_YOLOX__UTILS_HPP_
#endif // AUTOWARE__TENSORRT_YOLOX__UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "autoware/tensorrt_yolox/tensorrt_yolox_node.hpp"

#include "object_recognition_utils/object_classification.hpp"
#include "autoware/tensorrt_yolox/utils.hpp"
#include "object_recognition_utils/object_classification.hpp"

#include <autoware_perception_msgs/msg/object_classification.hpp>

Expand Down
6 changes: 2 additions & 4 deletions perception/autoware_tensorrt_yolox/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ std::vector<std::pair<uint8_t, int>> runLengthEncoder(const cv::Mat & image)
return compressed_data;
}


cv::Mat runLengthDecoder(
const std::vector<uint8_t> & rle_data, const int rows, const int cols)
cv::Mat runLengthDecoder(const std::vector<uint8_t> & rle_data, const int rows, const int cols)
{
cv::Mat mask(rows, cols, CV_8UC1, cv::Scalar(0));
int idx = 0;
Expand All @@ -63,4 +61,4 @@ cv::Mat runLengthDecoder(
return mask;
}

} // namespace tensorrt_yolox
} // namespace autoware::tensorrt_yolox

0 comments on commit 6764334

Please sign in to comment.