Program Listing for File vision_ascend.h

Return to documentation for file (include/vision_ascend.h)

#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_
#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_

#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "include/api/status.h"
#include "include/dataset/constants.h"
#include "include/dataset/transforms.h"

namespace mindspore {
namespace dataset {

// Transform operations for performing computer vision.
namespace vision {

/* ##################################### API class ###########################################*/

class  DvppDecodeResizeJpeg final : public TensorTransform {
 public:
  explicit DvppDecodeResizeJpeg(std::vector<uint32_t> resize);

  ~DvppDecodeResizeJpeg() = default;

 protected:
  std::shared_ptr<TensorOperation> Parse() override;

  std::shared_ptr<TensorOperation> Parse(const MapTargetDevice &env) override;

 private:
  struct Data;
  std::shared_ptr<Data> data_;
};

class  DvppDecodeResizeCropJpeg final : public TensorTransform {
 public:
  DvppDecodeResizeCropJpeg(std::vector<uint32_t> crop, std::vector<uint32_t> resize);

  ~DvppDecodeResizeCropJpeg() = default;

 protected:
  std::shared_ptr<TensorOperation> Parse() override;

  std::shared_ptr<TensorOperation> Parse(const MapTargetDevice &env) override;

 private:
  struct Data;
  std::shared_ptr<Data> data_;
};

class  DvppDecodePng final : public TensorTransform {
 public:
  DvppDecodePng();

  ~DvppDecodePng() = default;

 protected:
  std::shared_ptr<TensorOperation> Parse() override;

  std::shared_ptr<TensorOperation> Parse(const MapTargetDevice &env) override;
};

}  // namespace vision
}  // namespace dataset
}  // namespace mindspore

#endif  // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_