diff --git a/src/examples/Example_opencv.cpp b/examples/Example_opencv.cpp
similarity index 100%
rename from src/examples/Example_opencv.cpp
rename to examples/Example_opencv.cpp
diff --git a/src/examples/run.mp4 b/examples/run.mp4
similarity index 100%
rename from src/examples/run.mp4
rename to examples/run.mp4
diff --git a/src/examples/test.avi b/examples/test.avi
similarity index 100%
rename from src/examples/test.avi
rename to examples/test.avi
diff --git a/src/examples/test_video.mp4 b/examples/test_video.mp4
similarity index 100%
rename from src/examples/test_video.mp4
rename to examples/test_video.mp4
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e47105886..ac2680f9f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -114,6 +114,52 @@ if (ENABLE_BLACKMAGIC)
endif()
+################ OPENCV ##################
+
+find_package( OpenCV 4 )
+if (OpenCV_FOUND)
+ message("\nCOMPILING WITH OPENCV\n")
+ set(CMAKE_SWIG_FLAGS "-DUSE_OPENCV=1")
+ add_definitions( -DUSE_OPENCV=1 )
+else()
+ message("\nOPENCV NOT FOUND, SOME FUNCTIONALITIES WILL BE DISABLED\n")
+endif()
+
+################ PROTOBUF ##################
+if (OpenCV_FOUND)
+ find_package(Protobuf 3)
+
+ if (NOT Protobuf_FOUND)
+ # Protobuf is required when compiling with opencv
+ message(FATAL_ERROR "\nPLEASE INSTALL PROTOBUF. Protobuf is required when compiling with opencv.\n")
+ endif()
+
+ include_directories(${PROTOBUF_INCLUDE_DIR})
+
+ set(PROTOBUF_MESSAGES_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/protobuf_messages")
+
+ FILE(GLOB PROTO_MSGS "${PROTOBUF_MESSAGES_FOLDER}/*.proto")
+ foreach(PROTO_MSG ${PROTO_MSGS})
+ execute_process (
+ COMMAND bash -c "${PROTOBUF_PROTOC_EXECUTABLE} -I=${PROTOBUF_MESSAGES_FOLDER} --cpp_out=${PROTOBUF_MESSAGES_FOLDER} ${PROTO_MSG}"
+ )
+ endforeach()
+
+ FILE(GLOB PROTO_CCS "${PROTOBUF_MESSAGES_FOLDER}/*.pb.cc")
+ foreach(PROTO_CC ${PROTO_CCS})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_CC} ${CMAKE_CURRENT_SOURCE_DIR})
+ file(REMOVE ${PROTO_CC})
+ endforeach()
+
+ FILE(GLOB PROTO_HS "${PROTOBUF_MESSAGES_FOLDER}/*.pb.h")
+ foreach(PROTO_H ${PROTO_HS})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_H} ${CMAKE_CURRENT_SOURCE_DIR})
+ file(REMOVE ${PROTO_H})
+ endforeach()
+
+endif()
+
+
############### PROFILING #################
#set(PROFILER "/usr/lib/libprofiler.so.0.3.2")
#set(PROFILER "/usr/lib/libtcmalloc.so.4")
@@ -515,45 +561,6 @@ endif()
### INSTALL HEADERS & LIBRARY
###
-############### CLI EXECUTABLES ################
-# Create test executable
-add_executable(openshot-example examples/Example.cpp)
-
-
-# Define path to test input files
-set(TEST_MEDIA_PATH "${PROJECT_SOURCE_DIR}/src/examples/")
-if (WIN32)
- string(REPLACE "/" "\\\\" TEST_MEDIA_PATH TEST_MEDIA_PATH)
-endif()
-target_compile_definitions(openshot-example PRIVATE
- -DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" )
-
-# Link test executable to the new library
-target_link_libraries(openshot-example openshot)
-
-
-add_executable(openshot-html-test examples/ExampleHtml.cpp)
-target_link_libraries(openshot-html-test openshot Qt5::Gui)
-
-############### OPENCV EXAMPLE EXECUTABLE ################
-if (OpenCV_FOUND)
- # Create test Opencv executable
- add_executable( openshotCV-example examples/Example_opencv.cpp )
- # Define path to test input files
- target_link_libraries( openshotCV-example ${OpenCV_LIBS} openshot)
- target_compile_definitions(openshotCV-example PRIVATE
- -DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" )
- # Link test executable to the new library
- target_link_libraries(openshot-example openshot)
-endif()
-
-
-############### PLAYER EXECUTABLE ################
-# Create test executable
-add_executable(openshot-player Qt/demo/main.cpp)
-
-# Link test executable to the new library
-target_link_libraries(openshot-player openshot)
############### TEST BLACKMAGIC CAPTURE APP ################
if (BLACKMAGIC_FOUND)
@@ -565,8 +572,6 @@ if (BLACKMAGIC_FOUND)
target_link_libraries(openshot-blackmagic openshot)
endif()
-############### INCLUDE SWIG BINDINGS ################
-add_subdirectory(bindings)
############### INSTALL HEADERS & LIBRARY ################
diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp
index 13e6f0cb7..2e531a4dd 100644
--- a/src/CVObjectDetection.cpp
+++ b/src/CVObjectDetection.cpp
@@ -28,7 +28,7 @@
* along with OpenShot Library. If not, see .
*/
-#include "../include/CVObjectDetection.h"
+#include "CVObjectDetection.h"
// // Initialize the parameters
// float confThreshold = 0.5; // Confidence threshold
diff --git a/include/CVObjectDetection.h b/src/CVObjectDetection.h
similarity index 100%
rename from include/CVObjectDetection.h
rename to src/CVObjectDetection.h
diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp
index ecdd2bbe4..6f589031c 100644
--- a/src/CVStabilization.cpp
+++ b/src/CVStabilization.cpp
@@ -28,7 +28,7 @@
* along with OpenShot Library. If not, see .
*/
-#include "../include/CVStabilization.h"
+#include "CVStabilization.h"
// Set default smoothing window value to compute stabilization
CVStabilization::CVStabilization(std::string processInfoJson, ProcessingController &processingController)
diff --git a/include/CVStabilization.h b/src/CVStabilization.h
similarity index 100%
rename from include/CVStabilization.h
rename to src/CVStabilization.h
diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp
index 64df0b6e7..be57f09ac 100644
--- a/src/CVTracker.cpp
+++ b/src/CVTracker.cpp
@@ -28,7 +28,7 @@
* along with OpenShot Library. If not, see .
*/
-#include "../include/CVTracker.h"
+#include "CVTracker.h"
// Constructor
CVTracker::CVTracker(std::string processInfoJson, ProcessingController &processingController)
diff --git a/include/CVTracker.h b/src/CVTracker.h
similarity index 100%
rename from include/CVTracker.h
rename to src/CVTracker.h
diff --git a/src/ClipProcessingJobs.cpp b/src/ClipProcessingJobs.cpp
index 8745615ac..6a4b66898 100644
--- a/src/ClipProcessingJobs.cpp
+++ b/src/ClipProcessingJobs.cpp
@@ -1,4 +1,4 @@
-#include "../include/ClipProcessingJobs.h"
+#include "ClipProcessingJobs.h"
// Constructor responsible to choose processing type and apply to clip
ClipProcessingJobs::ClipProcessingJobs(std::string processingType, std::string processInfoJson) :
diff --git a/include/ClipProcessingJobs.h b/src/ClipProcessingJobs.h
similarity index 100%
rename from include/ClipProcessingJobs.h
rename to src/ClipProcessingJobs.h
diff --git a/src/Frame.cpp b/src/Frame.cpp
index 0673b6379..3dce9263e 100644
--- a/src/Frame.cpp
+++ b/src/Frame.cpp
@@ -939,6 +939,7 @@ std::shared_ptr Frame::GetImage()
}
#ifdef USE_OPENCV
+
// Convert Qimage to Mat
cv::Mat Frame::Qimage2mat( std::shared_ptr& qimage) {
diff --git a/include/ProcessingController.h b/src/ProcessingController.h
similarity index 100%
rename from include/ProcessingController.h
rename to src/ProcessingController.h
diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp
index 7906989f2..2b9745e5d 100644
--- a/src/effects/ObjectDetection.cpp
+++ b/src/effects/ObjectDetection.cpp
@@ -28,39 +28,8 @@
* along with OpenShot Library. If not, see .
*/
-#include "../../include/effects/ObjectDetection.h"
-
-/**
- * @file
- * @brief Source file for Tracker effect class
- * @author Jonathan Thomas
- *
- * @ref License
- */
-
-/* LICENSE
- *
- * Copyright (c) 2008-2019 OpenShot Studios, LLC
- * . This file is part of
- * OpenShot Library (libopenshot), an open-source project dedicated to
- * delivering high quality video editing and animation solutions to the
- * world. For more information visit .
- *
- * OpenShot Library (libopenshot) is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * OpenShot Library (libopenshot) is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with OpenShot Library. If not, see .
- */
-
-#include "../../include/effects/Tracker.h"
+#include "effects/ObjectDetection.h"
+#include "effects/Tracker.h"
using namespace openshot;
diff --git a/include/effects/ObjectDetection.h b/src/effects/ObjectDetection.h
similarity index 96%
rename from include/effects/ObjectDetection.h
rename to src/effects/ObjectDetection.h
index 5c1ef6f4b..058252f39 100644
--- a/include/effects/ObjectDetection.h
+++ b/src/effects/ObjectDetection.h
@@ -98,7 +98,9 @@ namespace openshot
/// @param frame The frame object that needs the effect applied to it
/// @param frame_number The frame number (starting at 1) of the effect on the timeline.
std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override;
-
+
+ std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); }
+
// Load protobuf data file
bool LoadObjDetectdData(std::string inputFilePath);
diff --git a/src/effects/Stabilizer.cpp b/src/effects/Stabilizer.cpp
index d6db55626..40d66bc33 100644
--- a/src/effects/Stabilizer.cpp
+++ b/src/effects/Stabilizer.cpp
@@ -28,7 +28,7 @@
* along with OpenShot Library. If not, see .
*/
-#include "../../include/effects/Stabilizer.h"
+#include "effects/Stabilizer.h"
using namespace openshot;
@@ -46,7 +46,6 @@ Stabilizer::Stabilizer()
{
// Init effect properties
init_effect_details();
- // LoadStabilizedData("/home/gustavostahl/LabVisao/VideoEditor/openshot-qt/stabilization.data");
}
// Init effect settings
diff --git a/include/effects/Stabilizer.h b/src/effects/Stabilizer.h
similarity index 96%
rename from include/effects/Stabilizer.h
rename to src/effects/Stabilizer.h
index ed29c1c49..f08053b63 100644
--- a/include/effects/Stabilizer.h
+++ b/src/effects/Stabilizer.h
@@ -114,6 +114,8 @@ namespace openshot
/// @param frame_number The frame number (starting at 1) of the effect on the timeline.
std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override;
+ std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); }
+
// Load protobuf data file
bool LoadStabilizedData(std::string inputFilePath);
diff --git a/src/effects/Tracker.cpp b/src/effects/Tracker.cpp
index 43bb9e5c5..78fd3e079 100644
--- a/src/effects/Tracker.cpp
+++ b/src/effects/Tracker.cpp
@@ -28,7 +28,7 @@
* along with OpenShot Library. If not, see .
*/
-#include "../../include/effects/Tracker.h"
+#include "effects/Tracker.h"
using namespace openshot;
diff --git a/include/effects/Tracker.h b/src/effects/Tracker.h
similarity index 96%
rename from include/effects/Tracker.h
rename to src/effects/Tracker.h
index 5421096ea..2d51dcc5a 100644
--- a/include/effects/Tracker.h
+++ b/src/effects/Tracker.h
@@ -111,7 +111,8 @@ namespace openshot
/// @param frame The frame object that needs the effect applied to it
/// @param frame_number The frame number (starting at 1) of the effect on the timeline.
std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override;
-
+ std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); }
+
// Load protobuf data file
bool LoadTrackedData(std::string inputFilePath);
diff --git a/src/objdetectdata.pb.cc b/src/objdetectdata.pb.cc
index 2d20dba0c..d4d04ea06 100644
--- a/src/objdetectdata.pb.cc
+++ b/src/objdetectdata.pb.cc
@@ -86,10 +86,10 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_objdetectdata_2eproto::offsets
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, x1_),
- PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, y1_),
- PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, x2_),
- PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, y2_),
+ PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, x_),
+ PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, y_),
+ PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, w_),
+ PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, h_),
PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, classid_),
PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, confidence_),
~0u, // no _has_bits_
@@ -122,15 +122,15 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
const char descriptor_table_protodef_objdetectdata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\023objdetectdata.proto\022\024libopenshotobjdet"
- "ect\032\037google/protobuf/timestamp.proto\"\246\001\n"
+ "ect\032\037google/protobuf/timestamp.proto\"\242\001\n"
"\005Frame\022\n\n\002id\030\001 \001(\005\0225\n\014bounding_box\030\002 \003(\013"
- "2\037.libopenshotobjdetect.Frame.Box\032Z\n\003Box"
- "\022\n\n\002x1\030\001 \001(\005\022\n\n\002y1\030\002 \001(\005\022\n\n\002x2\030\003 \001(\005\022\n\n\002"
- "y2\030\004 \001(\005\022\017\n\007classId\030\005 \001(\005\022\022\n\nconfidence\030"
- "\006 \001(\002\"}\n\tObjDetect\022*\n\005frame\030\001 \003(\0132\033.libo"
- "penshotobjdetect.Frame\0220\n\014last_updated\030\002"
- " \001(\0132\032.google.protobuf.Timestamp\022\022\n\nclas"
- "sNames\030\003 \003(\tb\006proto3"
+ "2\037.libopenshotobjdetect.Frame.Box\032V\n\003Box"
+ "\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001w\030\003 \001(\002\022\t\n\001h\030\004"
+ " \001(\002\022\017\n\007classId\030\005 \001(\005\022\022\n\nconfidence\030\006 \001("
+ "\002\"}\n\tObjDetect\022*\n\005frame\030\001 \003(\0132\033.libopens"
+ "hotobjdetect.Frame\0220\n\014last_updated\030\002 \001(\013"
+ "2\032.google.protobuf.Timestamp\022\022\n\nclassNam"
+ "es\030\003 \003(\tb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_objdetectdata_2eproto_deps[1] = {
&::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
@@ -142,7 +142,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_obj
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_objdetectdata_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_objdetectdata_2eproto = {
- false, false, descriptor_table_protodef_objdetectdata_2eproto, "objdetectdata.proto", 380,
+ false, false, descriptor_table_protodef_objdetectdata_2eproto, "objdetectdata.proto", 376,
&descriptor_table_objdetectdata_2eproto_once, descriptor_table_objdetectdata_2eproto_sccs, descriptor_table_objdetectdata_2eproto_deps, 3, 1,
schemas, file_default_instances, TableStruct_objdetectdata_2eproto::offsets,
file_level_metadata_objdetectdata_2eproto, 3, file_level_enum_descriptors_objdetectdata_2eproto, file_level_service_descriptors_objdetectdata_2eproto,
@@ -169,16 +169,16 @@ Frame_Box::Frame_Box(::PROTOBUF_NAMESPACE_ID::Arena* arena)
Frame_Box::Frame_Box(const Frame_Box& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&x1_, &from.x1_,
+ ::memcpy(&x_, &from.x_,
static_cast(reinterpret_cast(&confidence_) -
- reinterpret_cast(&x1_)) + sizeof(confidence_));
+ reinterpret_cast(&x_)) + sizeof(confidence_));
// @@protoc_insertion_point(copy_constructor:libopenshotobjdetect.Frame.Box)
}
void Frame_Box::SharedCtor() {
- ::memset(&x1_, 0, static_cast(
+ ::memset(&x_, 0, static_cast(
reinterpret_cast(&confidence_) -
- reinterpret_cast(&x1_)) + sizeof(confidence_));
+ reinterpret_cast(&x_)) + sizeof(confidence_));
}
Frame_Box::~Frame_Box() {
@@ -212,9 +212,9 @@ void Frame_Box::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- ::memset(&x1_, 0, static_cast(
+ ::memset(&x_, 0, static_cast(
reinterpret_cast(&confidence_) -
- reinterpret_cast(&x1_)) + sizeof(confidence_));
+ reinterpret_cast(&x_)) + sizeof(confidence_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -226,32 +226,32 @@ const char* Frame_Box::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
- // int32 x1 = 1;
+ // float x = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- x1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
+ x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 y1 = 2;
+ // float y = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- y1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) {
+ y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 x2 = 3;
+ // float w = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- x2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) {
+ w_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 y2 = 4;
+ // float h = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- y2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) {
+ h_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
// int32 classId = 5;
@@ -296,28 +296,28 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Frame_Box::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
- // int32 x1 = 1;
- if (this->x1() != 0) {
+ // float x = 1;
+ if (!(this->x() <= 0 && this->x() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x1(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target);
}
- // int32 y1 = 2;
- if (this->y1() != 0) {
+ // float y = 2;
+ if (!(this->y() <= 0 && this->y() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y1(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target);
}
- // int32 x2 = 3;
- if (this->x2() != 0) {
+ // float w = 3;
+ if (!(this->w() <= 0 && this->w() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_x2(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_w(), target);
}
- // int32 y2 = 4;
- if (this->y2() != 0) {
+ // float h = 4;
+ if (!(this->h() <= 0 && this->h() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_y2(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_h(), target);
}
// int32 classId = 5;
@@ -348,32 +348,24 @@ size_t Frame_Box::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int32 x1 = 1;
- if (this->x1() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x1());
+ // float x = 1;
+ if (!(this->x() <= 0 && this->x() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 y1 = 2;
- if (this->y1() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y1());
+ // float y = 2;
+ if (!(this->y() <= 0 && this->y() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 x2 = 3;
- if (this->x2() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x2());
+ // float w = 3;
+ if (!(this->w() <= 0 && this->w() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 y2 = 4;
- if (this->y2() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y2());
+ // float h = 4;
+ if (!(this->h() <= 0 && this->h() >= 0)) {
+ total_size += 1 + 4;
}
// int32 classId = 5;
@@ -419,17 +411,17 @@ void Frame_Box::MergeFrom(const Frame_Box& from) {
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
- if (from.x1() != 0) {
- _internal_set_x1(from._internal_x1());
+ if (!(from.x() <= 0 && from.x() >= 0)) {
+ _internal_set_x(from._internal_x());
}
- if (from.y1() != 0) {
- _internal_set_y1(from._internal_y1());
+ if (!(from.y() <= 0 && from.y() >= 0)) {
+ _internal_set_y(from._internal_y());
}
- if (from.x2() != 0) {
- _internal_set_x2(from._internal_x2());
+ if (!(from.w() <= 0 && from.w() >= 0)) {
+ _internal_set_w(from._internal_w());
}
- if (from.y2() != 0) {
- _internal_set_y2(from._internal_y2());
+ if (!(from.h() <= 0 && from.h() >= 0)) {
+ _internal_set_h(from._internal_h());
}
if (from.classid() != 0) {
_internal_set_classid(from._internal_classid());
@@ -463,9 +455,9 @@ void Frame_Box::InternalSwap(Frame_Box* other) {
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Frame_Box, confidence_)
+ sizeof(Frame_Box::confidence_)
- - PROTOBUF_FIELD_OFFSET(Frame_Box, x1_)>(
- reinterpret_cast(&x1_),
- reinterpret_cast(&other->x1_));
+ - PROTOBUF_FIELD_OFFSET(Frame_Box, x_)>(
+ reinterpret_cast(&x_),
+ reinterpret_cast(&other->x_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Frame_Box::GetMetadata() const {
diff --git a/include/objdetectdata.pb.h b/src/objdetectdata.pb.h
similarity index 91%
rename from include/objdetectdata.pb.h
rename to src/objdetectdata.pb.h
index 0b9966ebb..48630c17a 100644
--- a/include/objdetectdata.pb.h
+++ b/src/objdetectdata.pb.h
@@ -188,47 +188,47 @@ class Frame_Box PROTOBUF_FINAL :
// accessors -------------------------------------------------------
enum : int {
- kX1FieldNumber = 1,
- kY1FieldNumber = 2,
- kX2FieldNumber = 3,
- kY2FieldNumber = 4,
+ kXFieldNumber = 1,
+ kYFieldNumber = 2,
+ kWFieldNumber = 3,
+ kHFieldNumber = 4,
kClassIdFieldNumber = 5,
kConfidenceFieldNumber = 6,
};
- // int32 x1 = 1;
- void clear_x1();
- ::PROTOBUF_NAMESPACE_ID::int32 x1() const;
- void set_x1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ // float x = 1;
+ void clear_x();
+ float x() const;
+ void set_x(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_x1() const;
- void _internal_set_x1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_x() const;
+ void _internal_set_x(float value);
public:
- // int32 y1 = 2;
- void clear_y1();
- ::PROTOBUF_NAMESPACE_ID::int32 y1() const;
- void set_y1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ // float y = 2;
+ void clear_y();
+ float y() const;
+ void set_y(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_y1() const;
- void _internal_set_y1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_y() const;
+ void _internal_set_y(float value);
public:
- // int32 x2 = 3;
- void clear_x2();
- ::PROTOBUF_NAMESPACE_ID::int32 x2() const;
- void set_x2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ // float w = 3;
+ void clear_w();
+ float w() const;
+ void set_w(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_x2() const;
- void _internal_set_x2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_w() const;
+ void _internal_set_w(float value);
public:
- // int32 y2 = 4;
- void clear_y2();
- ::PROTOBUF_NAMESPACE_ID::int32 y2() const;
- void set_y2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ // float h = 4;
+ void clear_h();
+ float h() const;
+ void set_h(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_y2() const;
- void _internal_set_y2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_h() const;
+ void _internal_set_h(float value);
public:
// int32 classId = 5;
@@ -256,10 +256,10 @@ class Frame_Box PROTOBUF_FINAL :
template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int32 x1_;
- ::PROTOBUF_NAMESPACE_ID::int32 y1_;
- ::PROTOBUF_NAMESPACE_ID::int32 x2_;
- ::PROTOBUF_NAMESPACE_ID::int32 y2_;
+ float x_;
+ float y_;
+ float w_;
+ float h_;
::PROTOBUF_NAMESPACE_ID::int32 classid_;
float confidence_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -627,84 +627,84 @@ class ObjDetect PROTOBUF_FINAL :
#endif // __GNUC__
// Frame_Box
-// int32 x1 = 1;
-inline void Frame_Box::clear_x1() {
- x1_ = 0;
+// float x = 1;
+inline void Frame_Box::clear_x() {
+ x_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_x1() const {
- return x1_;
+inline float Frame_Box::_internal_x() const {
+ return x_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::x1() const {
- // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.x1)
- return _internal_x1();
+inline float Frame_Box::x() const {
+ // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.x)
+ return _internal_x();
}
-inline void Frame_Box::_internal_set_x1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_x(float value) {
- x1_ = value;
+ x_ = value;
}
-inline void Frame_Box::set_x1(::PROTOBUF_NAMESPACE_ID::int32 value) {
- _internal_set_x1(value);
- // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.x1)
+inline void Frame_Box::set_x(float value) {
+ _internal_set_x(value);
+ // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.x)
}
-// int32 y1 = 2;
-inline void Frame_Box::clear_y1() {
- y1_ = 0;
+// float y = 2;
+inline void Frame_Box::clear_y() {
+ y_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_y1() const {
- return y1_;
+inline float Frame_Box::_internal_y() const {
+ return y_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::y1() const {
- // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.y1)
- return _internal_y1();
+inline float Frame_Box::y() const {
+ // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.y)
+ return _internal_y();
}
-inline void Frame_Box::_internal_set_y1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_y(float value) {
- y1_ = value;
+ y_ = value;
}
-inline void Frame_Box::set_y1(::PROTOBUF_NAMESPACE_ID::int32 value) {
- _internal_set_y1(value);
- // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.y1)
+inline void Frame_Box::set_y(float value) {
+ _internal_set_y(value);
+ // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.y)
}
-// int32 x2 = 3;
-inline void Frame_Box::clear_x2() {
- x2_ = 0;
+// float w = 3;
+inline void Frame_Box::clear_w() {
+ w_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_x2() const {
- return x2_;
+inline float Frame_Box::_internal_w() const {
+ return w_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::x2() const {
- // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.x2)
- return _internal_x2();
+inline float Frame_Box::w() const {
+ // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.w)
+ return _internal_w();
}
-inline void Frame_Box::_internal_set_x2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_w(float value) {
- x2_ = value;
+ w_ = value;
}
-inline void Frame_Box::set_x2(::PROTOBUF_NAMESPACE_ID::int32 value) {
- _internal_set_x2(value);
- // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.x2)
+inline void Frame_Box::set_w(float value) {
+ _internal_set_w(value);
+ // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.w)
}
-// int32 y2 = 4;
-inline void Frame_Box::clear_y2() {
- y2_ = 0;
+// float h = 4;
+inline void Frame_Box::clear_h() {
+ h_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_y2() const {
- return y2_;
+inline float Frame_Box::_internal_h() const {
+ return h_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::y2() const {
- // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.y2)
- return _internal_y2();
+inline float Frame_Box::h() const {
+ // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.h)
+ return _internal_h();
}
-inline void Frame_Box::_internal_set_y2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_h(float value) {
- y2_ = value;
+ h_ = value;
}
-inline void Frame_Box::set_y2(::PROTOBUF_NAMESPACE_ID::int32 value) {
- _internal_set_y2(value);
- // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.y2)
+inline void Frame_Box::set_h(float value) {
+ _internal_set_h(value);
+ // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.h)
}
// int32 classId = 5;
diff --git a/src/protobuf_messages/compileProtobufMessages.sh b/src/protobuf_messages/compileProtobufMessages.sh
index c8d47be2b..df127ef2e 100644
--- a/src/protobuf_messages/compileProtobufMessages.sh
+++ b/src/protobuf_messages/compileProtobufMessages.sh
@@ -3,4 +3,4 @@ protoc -I=./ --cpp_out=./ trackerdata.proto
protoc -I=./ --cpp_out=./ objdetectdata.proto
mv *.cc ../
-mv *.h ../../include/
+mv *.h ../
diff --git a/include/stabilizedata.pb.h b/src/stabilizedata.pb.h
similarity index 100%
rename from include/stabilizedata.pb.h
rename to src/stabilizedata.pb.h
diff --git a/src/trackerdata.pb.cc b/src/trackerdata.pb.cc
index 24194e0ea..8536f4594 100644
--- a/src/trackerdata.pb.cc
+++ b/src/trackerdata.pb.cc
@@ -123,8 +123,8 @@ const char descriptor_table_protodef_trackerdata_2eproto[] PROTOBUF_SECTION_VARI
"\037google/protobuf/timestamp.proto\"\221\001\n\005Fra"
"me\022\n\n\002id\030\001 \001(\005\022\020\n\010rotation\030\002 \001(\002\0223\n\014boun"
"ding_box\030\003 \001(\0132\035.libopenshottracker.Fram"
- "e.Box\0325\n\003Box\022\n\n\002x1\030\001 \001(\005\022\n\n\002y1\030\002 \001(\005\022\n\n\002"
- "x2\030\003 \001(\005\022\n\n\002y2\030\004 \001(\005\"e\n\007Tracker\022(\n\005frame"
+ "e.Box\0325\n\003Box\022\n\n\002x1\030\001 \001(\002\022\n\n\002y1\030\002 \001(\002\022\n\n\002"
+ "x2\030\003 \001(\002\022\n\n\002y2\030\004 \001(\002\"e\n\007Tracker\022(\n\005frame"
"\030\001 \003(\0132\031.libopenshottracker.Frame\0220\n\014las"
"t_updated\030\002 \001(\0132\032.google.protobuf.Timest"
"ampb\006proto3"
@@ -223,32 +223,32 @@ const char* Frame_Box::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
- // int32 x1 = 1;
+ // float x1 = 1;
case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
- x1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) {
+ x1_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 y1 = 2;
+ // float y1 = 2;
case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
- y1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) {
+ y1_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 x2 = 3;
+ // float x2 = 3;
case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
- x2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) {
+ x2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
- // int32 y2 = 4;
+ // float y2 = 4;
case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- y2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) {
+ y2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr);
+ ptr += sizeof(float);
} else goto handle_unusual;
continue;
default: {
@@ -279,28 +279,28 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Frame_Box::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
- // int32 x1 = 1;
- if (this->x1() != 0) {
+ // float x1 = 1;
+ if (!(this->x1() <= 0 && this->x1() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_x1(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x1(), target);
}
- // int32 y1 = 2;
- if (this->y1() != 0) {
+ // float y1 = 2;
+ if (!(this->y1() <= 0 && this->y1() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_y1(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y1(), target);
}
- // int32 x2 = 3;
- if (this->x2() != 0) {
+ // float x2 = 3;
+ if (!(this->x2() <= 0 && this->x2() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_x2(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_x2(), target);
}
- // int32 y2 = 4;
- if (this->y2() != 0) {
+ // float y2 = 4;
+ if (!(this->y2() <= 0 && this->y2() >= 0)) {
target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_y2(), target);
+ target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_y2(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -319,32 +319,24 @@ size_t Frame_Box::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
- // int32 x1 = 1;
- if (this->x1() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x1());
+ // float x1 = 1;
+ if (!(this->x1() <= 0 && this->x1() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 y1 = 2;
- if (this->y1() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y1());
+ // float y1 = 2;
+ if (!(this->y1() <= 0 && this->y1() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 x2 = 3;
- if (this->x2() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_x2());
+ // float x2 = 3;
+ if (!(this->x2() <= 0 && this->x2() >= 0)) {
+ total_size += 1 + 4;
}
- // int32 y2 = 4;
- if (this->y2() != 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- this->_internal_y2());
+ // float y2 = 4;
+ if (!(this->y2() <= 0 && this->y2() >= 0)) {
+ total_size += 1 + 4;
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -378,16 +370,16 @@ void Frame_Box::MergeFrom(const Frame_Box& from) {
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
- if (from.x1() != 0) {
+ if (!(from.x1() <= 0 && from.x1() >= 0)) {
_internal_set_x1(from._internal_x1());
}
- if (from.y1() != 0) {
+ if (!(from.y1() <= 0 && from.y1() >= 0)) {
_internal_set_y1(from._internal_y1());
}
- if (from.x2() != 0) {
+ if (!(from.x2() <= 0 && from.x2() >= 0)) {
_internal_set_x2(from._internal_x2());
}
- if (from.y2() != 0) {
+ if (!(from.y2() <= 0 && from.y2() >= 0)) {
_internal_set_y2(from._internal_y2());
}
}
diff --git a/include/trackerdata.pb.h b/src/trackerdata.pb.h
similarity index 92%
rename from include/trackerdata.pb.h
rename to src/trackerdata.pb.h
index 8225113ff..d30c6ef10 100644
--- a/include/trackerdata.pb.h
+++ b/src/trackerdata.pb.h
@@ -193,40 +193,40 @@ class Frame_Box PROTOBUF_FINAL :
kX2FieldNumber = 3,
kY2FieldNumber = 4,
};
- // int32 x1 = 1;
+ // float x1 = 1;
void clear_x1();
- ::PROTOBUF_NAMESPACE_ID::int32 x1() const;
- void set_x1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float x1() const;
+ void set_x1(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_x1() const;
- void _internal_set_x1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_x1() const;
+ void _internal_set_x1(float value);
public:
- // int32 y1 = 2;
+ // float y1 = 2;
void clear_y1();
- ::PROTOBUF_NAMESPACE_ID::int32 y1() const;
- void set_y1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float y1() const;
+ void set_y1(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_y1() const;
- void _internal_set_y1(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_y1() const;
+ void _internal_set_y1(float value);
public:
- // int32 x2 = 3;
+ // float x2 = 3;
void clear_x2();
- ::PROTOBUF_NAMESPACE_ID::int32 x2() const;
- void set_x2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float x2() const;
+ void set_x2(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_x2() const;
- void _internal_set_x2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_x2() const;
+ void _internal_set_x2(float value);
public:
- // int32 y2 = 4;
+ // float y2 = 4;
void clear_y2();
- ::PROTOBUF_NAMESPACE_ID::int32 y2() const;
- void set_y2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float y2() const;
+ void set_y2(float value);
private:
- ::PROTOBUF_NAMESPACE_ID::int32 _internal_y2() const;
- void _internal_set_y2(::PROTOBUF_NAMESPACE_ID::int32 value);
+ float _internal_y2() const;
+ void _internal_set_y2(float value);
public:
// @@protoc_insertion_point(class_scope:libopenshottracker.Frame.Box)
@@ -236,10 +236,10 @@ class Frame_Box PROTOBUF_FINAL :
template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
- ::PROTOBUF_NAMESPACE_ID::int32 x1_;
- ::PROTOBUF_NAMESPACE_ID::int32 y1_;
- ::PROTOBUF_NAMESPACE_ID::int32 x2_;
- ::PROTOBUF_NAMESPACE_ID::int32 y2_;
+ float x1_;
+ float y1_;
+ float x2_;
+ float y2_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_trackerdata_2eproto;
};
@@ -590,82 +590,82 @@ class Tracker PROTOBUF_FINAL :
#endif // __GNUC__
// Frame_Box
-// int32 x1 = 1;
+// float x1 = 1;
inline void Frame_Box::clear_x1() {
x1_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_x1() const {
+inline float Frame_Box::_internal_x1() const {
return x1_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::x1() const {
+inline float Frame_Box::x1() const {
// @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.x1)
return _internal_x1();
}
-inline void Frame_Box::_internal_set_x1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_x1(float value) {
x1_ = value;
}
-inline void Frame_Box::set_x1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::set_x1(float value) {
_internal_set_x1(value);
// @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.x1)
}
-// int32 y1 = 2;
+// float y1 = 2;
inline void Frame_Box::clear_y1() {
y1_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_y1() const {
+inline float Frame_Box::_internal_y1() const {
return y1_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::y1() const {
+inline float Frame_Box::y1() const {
// @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.y1)
return _internal_y1();
}
-inline void Frame_Box::_internal_set_y1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_y1(float value) {
y1_ = value;
}
-inline void Frame_Box::set_y1(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::set_y1(float value) {
_internal_set_y1(value);
// @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.y1)
}
-// int32 x2 = 3;
+// float x2 = 3;
inline void Frame_Box::clear_x2() {
x2_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_x2() const {
+inline float Frame_Box::_internal_x2() const {
return x2_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::x2() const {
+inline float Frame_Box::x2() const {
// @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.x2)
return _internal_x2();
}
-inline void Frame_Box::_internal_set_x2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_x2(float value) {
x2_ = value;
}
-inline void Frame_Box::set_x2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::set_x2(float value) {
_internal_set_x2(value);
// @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.x2)
}
-// int32 y2 = 4;
+// float y2 = 4;
inline void Frame_Box::clear_y2() {
y2_ = 0;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_y2() const {
+inline float Frame_Box::_internal_y2() const {
return y2_;
}
-inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::y2() const {
+inline float Frame_Box::y2() const {
// @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.y2)
return _internal_y2();
}
-inline void Frame_Box::_internal_set_y2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::_internal_set_y2(float value) {
y2_ = value;
}
-inline void Frame_Box::set_y2(::PROTOBUF_NAMESPACE_ID::int32 value) {
+inline void Frame_Box::set_y2(float value) {
_internal_set_y2(value);
// @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.y2)
}
diff --git a/tests/CVObjectDetection_Tests.cpp b/tests/CVObjectDetection_Tests.cpp
index 9a8e09ba2..3ab6b1059 100644
--- a/tests/CVObjectDetection_Tests.cpp
+++ b/tests/CVObjectDetection_Tests.cpp
@@ -32,9 +32,9 @@
#include "UnitTest++.h"
// Prevent name clashes with juce::UnitTest
#define DONT_SET_USING_JUCE_NAMESPACE 1
-#include "../include/OpenShot.h"
-#include "../include/ProcessingController.h"
-#include "../include/Json.h"
+#include "OpenShot.h"
+//#include "ProcessingController.h"
+//#include "Json.h"
#include
using namespace openshot;
diff --git a/tests/CVStabilizer_Tests.cpp b/tests/CVStabilizer_Tests.cpp
index 7b67c52ba..400f74eaf 100644
--- a/tests/CVStabilizer_Tests.cpp
+++ b/tests/CVStabilizer_Tests.cpp
@@ -32,8 +32,8 @@
#include "UnitTest++.h"
// Prevent name clashes with juce::UnitTest
#define DONT_SET_USING_JUCE_NAMESPACE 1
-#include "../include/OpenShot.h"
-#include "../include/ProcessingController.h"
+#include "OpenShot.h"
+//#include "ProcessingController.h"
#include
using namespace openshot;
diff --git a/tests/CVTracker_Tests.cpp b/tests/CVTracker_Tests.cpp
index ff89550c4..6fe6abf0c 100644
--- a/tests/CVTracker_Tests.cpp
+++ b/tests/CVTracker_Tests.cpp
@@ -32,8 +32,8 @@
#include "UnitTest++.h"
// Prevent name clashes with juce::UnitTest
#define DONT_SET_USING_JUCE_NAMESPACE 1
-#include "../include/OpenShot.h"
-#include "../include/ProcessingController.h"
+#include "OpenShot.h"
+//#include "ProcessingController.h"
#include
using namespace openshot;