mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* add SDK support for PANet * fix panet * fix panet * simplify panet * add PSENet support * fix-psenet * add CUDA post-processing for DBNet * fix dbnet * fix dbnet * add cpu support for PANet * fix panet * add CUDA support for PANet * fix panet * format * add cpu impls for PSENet * fix psenet * add cuda impl for PSENet * fix psenet * add param parsing * simplify impls * simplify impls * clean-up * fix lint * fix cuda-10 build * fix cuda-10 build
38 lines
793 B
C++
38 lines
793 B
C++
// Copyright (c) OpenMMLab. All rights reserved
|
|
|
|
#ifndef FAST_CC__CONNECTED_COMPONENT_H_
|
|
#define FAST_CC__CONNECTED_COMPONENT_H_
|
|
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
#include "opencv2/core.hpp"
|
|
|
|
namespace mmdeploy {
|
|
|
|
class ConnectedComponents {
|
|
public:
|
|
explicit ConnectedComponents(void* stream);
|
|
|
|
~ConnectedComponents();
|
|
|
|
void Resize(int height, int width);
|
|
|
|
int GetComponents(const uint8_t* d_mask, int* h_label);
|
|
|
|
void GetContours(std::vector<std::vector<cv::Point>>& corners);
|
|
|
|
void GetStats(const uint8_t* d_mask, const float* d_score, std::vector<float>& scores,
|
|
std::vector<int>& areas);
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> impl_;
|
|
};
|
|
|
|
} // namespace mmdeploy
|
|
|
|
#endif // FAST_CC__CONNECTED_COMPONENT_H_
|