diff options
author | Emilian Peev <epeev@google.com> | 2019-01-09 19:02:52 +0000 |
---|---|---|
committer | Emilian Peev <epeev@google.com> | 2019-01-15 09:58:18 +0000 |
commit | 104751a668f508abc922cd8d353de64a4c4c9ba1 (patch) | |
tree | 03614abc8258f2c4d701fa057a450fa6a20e42b8 /includes/dynamic_depth/point_cloud.h | |
parent | ec731c6e0af9d28d4bbb87f5ffc6ac3ee9c01852 (diff) | |
download | dynamic_depth-104751a668f508abc922cd8d353de64a4c4c9ba1.tar.gz |
Sync libdynamic_depth to CL #228913159
Brief description of the changes included:
- Reduce logspam
- Remove photos_editing_formats from namespaces
- Add a Device serialization method for {i,o}streams
- Add confidence to PointCloud
- Disable unsigned overflow sanitizer during MD5 transformation
- Remove unnecessary inner namespaces "absl" and "strings".
Bug: 109735087
Test: Camera CTS
Change-Id: I3006a1c95b1ddbdb0523ee8326a40bb6d72a2718
Diffstat (limited to 'includes/dynamic_depth/point_cloud.h')
-rw-r--r-- | includes/dynamic_depth/point_cloud.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/includes/dynamic_depth/point_cloud.h b/includes/dynamic_depth/point_cloud.h index 3e53744..562e3f4 100644 --- a/includes/dynamic_depth/point_cloud.h +++ b/includes/dynamic_depth/point_cloud.h @@ -11,7 +11,6 @@ // Implements the Point Cloud element from the Dynamic Depth specification, with // serialization and deserialization. -namespace photos_editing_formats { namespace dynamic_depth { class PointCloud : public Element { @@ -19,23 +18,26 @@ class PointCloud : public Element { void GetNamespaces( std::unordered_map<string, string>* ns_name_href_map) override; - bool Serialize(xml::Serializer* serializer) const override; + bool Serialize( + ::dynamic_depth::xmpmeta::xml::Serializer* serializer) const override; // Creates a Point Cloud from the given fields. Returns null if position is - // empty or points.size() is not divisible by 3. + // empty or points.size() is not divisible by 4. // The first two arguments are required fields, the rest are optional. - // points is a list of (x, y, z) tuples, so it must have a size that is - // evenly divisible by 3. + // points is a list of (x, y, z, c) tuples, so it must have a size that is + // evenly divisible by 4. + // The first three values are the point's XYZ coordinates, and the fourth + // is the confidence value. More details are available in the specification. static std::unique_ptr<PointCloud> FromData(const std::vector<float>& points, bool metric); // Returns the deserialized PointCloud; null if parsing fails. // The returned pointer is owned by the caller. static std::unique_ptr<PointCloud> FromDeserializer( - const xml::Deserializer& parent_deserializer); + const ::dynamic_depth::xmpmeta::xml::Deserializer& parent_deserializer); // Getters. - // Returns the number of (x, y, z) tuples, *not* the length of points_. + // Returns the number of (x, y, z, c) tuples, *not* the length of points_. int GetPointCount() const; const std::vector<float>& GetPoints() const; bool GetMetric() const; @@ -46,7 +48,8 @@ class PointCloud : public Element { private: PointCloud(); - bool ParseFields(const xml::Deserializer& deserializer); + bool ParseFields( + const ::dynamic_depth::xmpmeta::xml::Deserializer& deserializer); // Required fields. std::vector<float> points_; @@ -56,6 +59,5 @@ class PointCloud : public Element { }; } // namespace dynamic_depth -} // namespace photos_editing_formats -#endif // DYNAMIC_DEPTH_INCLUDES_DYNAMIC_DEPTH_POINT_CLOUD_H_ // NOLINT +#endif // DYNAMIC_DEPTH_INCLUDES_DYNAMIC_DEPTH_POINT_CLOUD_H_ // NOLINT |