-
Notifications
You must be signed in to change notification settings - Fork 10
Add several interfaces about point cloud etc #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yzhou-bcom
wants to merge
7
commits into
master
Choose a base branch
from
feat/add-pc-semantic-generator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cfcac33
feat: add interface api::pointCloud::IPCSemanticFrom2D
yzhou-bcom 5c2c437
fix: set descriptor type to UNDEFINED by default
yzhou-bcom 6c23dad
feat: add IKeyframeLoader in api::input::files
yzhou-bcom 3d1ba2d
feat: add interface IPCProjectOntoImage
yzhou-bcom 725effe
Merge branch 'master' into feat/add-pc-semantic-generator
yzhou-bcom da04799
fix: remove KeyframeFileType and add IMapLoader.h in .pri
yzhou-bcom aec835a
fix(datastructure): do not update m_embedKeyframeImages after setting…
yzhou-bcom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /** | ||
| * @copyright Copyright (c) 2026 B-com http://www.b-com.com/ | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef SOLAR_IKEYFRAMELOADER_H | ||
| #define SOLAR_IKEYFRAMELOADER_H | ||
|
|
||
| #include "datastructure/CameraParametersCollection.h" | ||
| #include "datastructure/KeyframeCollection.h" | ||
| #include <optional> | ||
| #include <xpcf/api/IComponentIntrospect.h> | ||
|
|
||
| namespace SolAR { | ||
| namespace api { | ||
| namespace input { | ||
| namespace files { | ||
jim-bcom marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * @class IKeyframeLoader | ||
| * @brief <B>Load a keyframe collection from file.</B> | ||
| * <TT>UUID: 2d1d125c-6bd2-4e2c-af76-f58910cb7791</TT> | ||
| * | ||
| */ | ||
| class XPCF_IGNORE IKeyframeLoader : virtual public org::bcom::xpcf::IComponentIntrospect { | ||
| public: | ||
| /// @brief default constructor | ||
| IKeyframeLoader() = default; | ||
|
|
||
| /// @brief default destructor | ||
| virtual ~IKeyframeLoader() = default; | ||
|
|
||
| /// @brief Load a keyframe collection from file | ||
| /// @param[out] keyframeCollection the loaded keyframe collection (camera ID is set to 0) | ||
| /// @return FrameworkReturnCode::_SUCCESS if load succeeded, else FrameworkReturnCode::_ERROR_ | ||
| virtual FrameworkReturnCode load(SRef<SolAR::datastructure::KeyframeCollection>& keyframeCollection) = 0; | ||
|
|
||
| /// @brief Load a keyframe collection and a camera parameters collection from file | ||
| /// @param[out] keyframeCollection the loaded keyframe collection | ||
| /// @param[out] cameraParametersCollection the loaded camera parameters collection | ||
| /// @return FrameworkReturnCode::_SUCCESS if load succeeded, else FrameworkReturnCode::_ERROR_ | ||
| virtual FrameworkReturnCode load(SRef<SolAR::datastructure::KeyframeCollection>& keyframeCollection, | ||
| SRef<SolAR::datastructure::CameraParametersCollection>& cameraParametersCollection) = 0; | ||
| }; | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::input::files::IKeyframeLoader, | ||
| "2d1d125c-6bd2-4e2c-af76-f58910cb7791", | ||
| "IKeyframeLoader", | ||
| "Load a keyframe collection from file"); | ||
|
|
||
|
|
||
| #endif // SOLAR_IKEYFRAMELOADER_H | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,58 @@ | ||
| /** | ||
| * @copyright Copyright (c) 2024 B-com http://www.b-com.com/ | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| #ifndef SOLAR_IPOINTCLOUDLOADER_H | ||
| #define SOLAR_IPOINTCLOUDLOADER_H | ||
| #include <xpcf/api/IComponentIntrospect.h> | ||
| #include <xpcf/core/helpers.h> | ||
| #include "core/Messages.h" | ||
| #include "datastructure/Map.h" | ||
| namespace SolAR { | ||
| namespace api { | ||
| namespace input { | ||
| namespace files { | ||
| /** | ||
| * @class IMapLoader | ||
| * @brief <B>Loads a map from a file.</B> | ||
| * <TT>UUID: 84dbbc4f-cc65-40ff-946d-7ed4999fb3a5</TT> | ||
| * | ||
| */ | ||
| class XPCF_IGNORE IMapLoader : | ||
| virtual public org::bcom::xpcf::IComponentIntrospect { | ||
| public: | ||
| IMapLoader() = default; | ||
| virtual ~IMapLoader() = default; | ||
| /// @brief Load a Map from a filepath | ||
| /// @param[out] map the loaded map | ||
| /// @return FrameworkReturnCode::_SUCCESS if load succeed, else FrameworkReturnCode::_ERROR_ | ||
| virtual FrameworkReturnCode load(SRef<SolAR::datastructure::Map> & map) = 0; | ||
| }; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::input::files::IMapLoader, | ||
| "84dbbc4f-cc65-40ff-946d-7ed4999fb3a5", | ||
| "IMapLoader", | ||
| "Load a map from a file"); | ||
| #endif // SOLAR_IPOINTCLOUDLOADER_H | ||
| /** | ||
| * @copyright Copyright (c) 2024 B-com http://www.b-com.com/ | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef SOLAR_IMAPLOADER_H | ||
| #define SOLAR_IMAPLOADER_H | ||
|
|
||
| #include <xpcf/api/IComponentIntrospect.h> | ||
| #include <xpcf/core/helpers.h> | ||
| #include "core/Messages.h" | ||
| #include "datastructure/Map.h" | ||
|
|
||
| namespace SolAR { | ||
| namespace api { | ||
| namespace input { | ||
| namespace files { | ||
| /** | ||
| * @class IMapLoader | ||
| * @brief <B>Loads a map from a file.</B> | ||
| * <TT>UUID: 84dbbc4f-cc65-40ff-946d-7ed4999fb3a5</TT> | ||
| * | ||
| */ | ||
| class XPCF_IGNORE IMapLoader : | ||
| virtual public org::bcom::xpcf::IComponentIntrospect { | ||
| public: | ||
| IMapLoader() = default; | ||
| virtual ~IMapLoader() = default; | ||
|
|
||
| /// @brief Load a Map from a filepath | ||
| /// @param[out] map the loaded map | ||
| /// @return FrameworkReturnCode::_SUCCESS if load succeed, else FrameworkReturnCode::_ERROR_ | ||
| virtual FrameworkReturnCode load(SRef<SolAR::datastructure::Map> & map) = 0; | ||
| }; | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::input::files::IMapLoader, | ||
| "84dbbc4f-cc65-40ff-946d-7ed4999fb3a5", | ||
| "IMapLoader", | ||
| "Load a map from a file"); | ||
|
|
||
|
|
||
| #endif // SOLAR_IMAPLOADER_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /** | ||
| * @copyright Copyright (c) 2026 B-com http://www.b-com.com/ | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef SOLAR_IPCPROJECTONTOIMAGE_H | ||
| #define SOLAR_IPCPROJECTONTOIMAGE_H | ||
|
|
||
| #include "datastructure/CameraDefinitions.h" | ||
| #include "datastructure/Image.h" | ||
| #include "datastructure/PointCloud.h" | ||
| #include <xpcf/api/IComponentIntrospect.h> | ||
| #include <xpcf/core/helpers.h> | ||
|
|
||
| namespace SolAR { | ||
| namespace api { | ||
| namespace pointCloud { | ||
|
|
||
| /** | ||
| * @class IPCProjectOntoImage | ||
| * @brief <B>Project a point cloud onto image.</B> | ||
| * <TT>UUId: 3700812e-0af5-4968-b972-4fdc6d3d7371</TT> | ||
| */ | ||
|
|
||
| class XPCF_IGNORE IPCProjectOntoImage : virtual public org::bcom::xpcf::IComponentIntrospect { | ||
| public: | ||
| /// @brief IPCProjectOntoImage default constructor | ||
| IPCProjectOntoImage() = default; | ||
|
|
||
| /// @brief IPCProjectOntoImage default destructor | ||
| virtual ~IPCProjectOntoImage() = default; | ||
|
|
||
| /// @brief Project a point cloud onto an image plane | ||
| /// @param[in] pointCloud the point cloud | ||
| /// @param[in] cameraParameters the camera parameters | ||
| /// @param[in] pose the camera pose | ||
| /// @param[out] image output image created from the point cloud | ||
| /// @return FrameworkReturnCode::_SUCCESS (pointcloud projected onto image successfully) otherwise FrameworkReturnCode::_ERROR_ (failure) | ||
| virtual FrameworkReturnCode project(SRef<SolAR::datastructure::PointCloud> pointCloud, | ||
| SRef<SolAR::datastructure::CameraParameters> cameraParameters, | ||
| const SolAR::datastructure::Transform3Df& pose, | ||
| SRef<SolAR::datastructure::Image>& image) const = 0; | ||
|
|
||
| }; | ||
| } | ||
| } | ||
| } // end of namespace Solar | ||
|
|
||
| XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::pointCloud::IPCProjectOntoImage, | ||
| "3700812e-0af5-4968-b972-4fdc6d3d7371", | ||
| "IPCProjectOntoImage", | ||
| "Interface for projecting a point cloud onto image"); | ||
|
|
||
|
|
||
| #endif // SOLAR_IPCPROJECTONTOIMAGE_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /** | ||
| * @copyright Copyright (c) 2026 B-com http://www.b-com.com/ | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef SOLAR_IPCSEMANTICFROM2D_H | ||
| #define SOLAR_IPCSEMANTICFROM2D_H | ||
|
|
||
| #include "core/Messages.h" | ||
| #include "datastructure/CameraParametersCollection.h" | ||
| #include "datastructure/KeyframeCollection.h" | ||
| #include "datastructure/Mask2DCollection.h" | ||
| #include "datastructure/PointCloud.h" | ||
| #include <xpcf/api/IComponentIntrospect.h> | ||
| #include <xpcf/core/helpers.h> | ||
|
|
||
| namespace SolAR { | ||
| namespace api { | ||
| namespace pointCloud { | ||
|
|
||
| /** | ||
| * @class IPCSemanticFrom2D | ||
| * @brief <B>Estimate semantic Ids of cloud points from 2D information.</B> | ||
| * <TT>UUId: e7f67167-1512-4c1c-808a-adcfb606030e</TT> | ||
| */ | ||
|
|
||
| class XPCF_IGNORE IPCSemanticFrom2D : virtual public org::bcom::xpcf::IComponentIntrospect { | ||
| public: | ||
| /// @brief IPCSemanticFrom2D default constructor | ||
| IPCSemanticFrom2D() = default; | ||
|
|
||
| /// @brief IPCSemanticFrom2D default destructor | ||
| virtual ~IPCSemanticFrom2D() = default; | ||
|
|
||
| /// @brief Estimate point cloud semantic Ids from a keyframe collection and a mask collection | ||
| /// @param[in,out] pointCloud the point cloud for which semantic Ids will be estimated | ||
| /// @param[in] keyframeCollection input list of keyframes | ||
| /// @param[in] cameraParametersCollection input list of camera parameters | ||
| /// @param[in] maskCollection input list of masks | ||
| /// @return FrameworkReturnCode::_SUCCESS (semantic id estimated successfully) otherwise FrameworkReturnCode::_ERROR_ (failure) | ||
| virtual FrameworkReturnCode estimate(SRef<SolAR::datastructure::PointCloud> pointCloud, | ||
| SRef<SolAR::datastructure::KeyframeCollection> keyframeCollection, | ||
| SRef<SolAR::datastructure::CameraParametersCollection> cameraParametersCollection, | ||
| SRef<SolAR::datastructure::Mask2DCollection> maskCollection) const = 0; | ||
|
|
||
| }; | ||
| } | ||
| } | ||
| } // end of namespace Solar | ||
|
|
||
| XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::pointCloud::IPCSemanticFrom2D, | ||
| "e7f67167-1512-4c1c-808a-adcfb606030e", | ||
| "IPCSemanticFrom2D", | ||
| "Interface for estimating semantic Ids of cloud points from 2D information"); | ||
|
|
||
|
|
||
| #endif // SOLAR_IPCSEMANTICFROM2D_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.