iVS3D v2.0.9
Loading...
Searching...
No Matches
imask.h
1#pragma once
2
3#include <QObject>
4#include <QDir>
5#include <tl/expected.hpp>
6
7#include "ierror.h"
8#include "opencv2/core.hpp"
9
10namespace PLUG {
11
18using MaskResult = tl::expected<cv::Mat, Error>;
19
26struct MaskData {
27 uint index; // Index of the image in the sequence
28 cv::Mat image; // The image to create a mask for
29 QDir exportDir; // Directory where the generated mask will be saved
30};
31
46class IMask {
47 public:
48 virtual ~IMask() = default;
60 virtual MaskResult generateMask(const MaskData& data) = 0;
61};
62
63} // namespace PLUG
64
65Q_DECLARE_INTERFACE(PLUG::IMask, "iVS3D.IMask")
Interface for mask generation plugins in iVS3D.
Definition imask.h:46
virtual MaskResult generateMask(const MaskData &data)=0
Generates a binary mask for the given image data.
Plugin interface namespace containing common plugin contracts and helper types.
Struct containing data required to generate a binary mask. The image is resized to the working resolu...
Definition imask.h:26