global.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. #include <vector>
  16. // The configuration information of a meter, composed of scale value,
  17. // range, unit.
  18. typedef struct MeterConfig {
  19. float scale_value;
  20. float range;
  21. char str[10];
  22. } MeterConfig_T;
  23. // The size of inputting images of the detector
  24. extern std::vector<int> IMAGE_SHAPE;
  25. // The size of visualized prediction
  26. extern std::vector<int> RESULT_SHAPE;
  27. // The size of inputting images of the segmenter,
  28. // also the size of circular meters.
  29. extern std::vector<int> METER_SHAPE;
  30. extern MeterConfig_T meter_config[];
  31. // The type of a meter is estimated by a threshold. If the number of scales
  32. // in a meter is greater than or equal to the threshold, the meter is
  33. // belong to the former type. Otherwize, the latter.
  34. #define TYPE_THRESHOLD 40