|
| 1 | +/** |
| 2 | + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +#ifndef SOLARIMAGEMARKERLOADEROPENCV_H |
| 18 | +#define SOLARIMAGEMARKERLOADEROPENCV_H |
| 19 | + |
| 20 | +#include <api/input/files/ITrackableLoader.h> |
| 21 | +#include <xpcf/component/ConfigurableBase.h> |
| 22 | +#include <SolAROpencvAPI.h> |
| 23 | + |
| 24 | +namespace SolAR { |
| 25 | +namespace MODULES { |
| 26 | +namespace OPENCV { |
| 27 | + |
| 28 | +/** |
| 29 | + * @class SolARImageMarkerLoaderOpencv |
| 30 | + * @brief <B>Loads a 2D natural image marker from a file.</B> |
| 31 | + * <TT>UUID: aae41002-8e5b-11eb-8dcd-0242ac130003</TT> |
| 32 | + * |
| 33 | + * @SolARComponentPropertiesBegin |
| 34 | + * @SolARComponentProperty{ filePath, |
| 35 | + * the path to the file describing the 2D natural image marker, |
| 36 | + * @SolARComponentPropertyDescString{ "" }} |
| 37 | + * @SolARComponentPropertiesEnd |
| 38 | + */ |
| 39 | + |
| 40 | +class SOLAROPENCV_EXPORT_API SolARImageMarkerLoaderOpencv : public org::bcom::xpcf::ConfigurableBase, |
| 41 | + public api::input::files::ITrackableLoader { |
| 42 | +public: |
| 43 | + SolARImageMarkerLoaderOpencv(); |
| 44 | + |
| 45 | + ~SolARImageMarkerLoaderOpencv() override = default; |
| 46 | + void unloadComponent () override final; |
| 47 | + |
| 48 | + /// @brief Loads a specific trackable object and its features. |
| 49 | + /// @param [in,out] trackable: the loaded trackable loaded |
| 50 | + /// @return FrameworkReturnCode::_SUCCESS if load succeed, else FrameworkReturnCode::_ERROR_ |
| 51 | + virtual FrameworkReturnCode loadTrackable(SRef<datastructure::Trackable>& trackable) override; |
| 52 | + |
| 53 | +private: |
| 54 | + /// @brief the path to the file describing the 2D natural image marker |
| 55 | + std::string m_filePath =""; |
| 56 | +}; |
| 57 | + |
| 58 | +} |
| 59 | +} |
| 60 | +} |
| 61 | + |
| 62 | +#endif |
0 commit comments