diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ac2680f9..ac2c032f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,132 +34,6 @@ if (POLICY CMP0057) cmake_policy(SET CMP0057 NEW) endif() -# Juce requires either DEBUG or NDEBUG to be defined on MacOS. -# -DNDEBUG is set by cmake for all release configs, so add -# -DDEBUG for debug builds. We'll do this for all OSes, even -# though only MacOS requires it. -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") -# Make sure we've picked some build type, default to debug -if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") - set(CMAKE_BUILD_TYPE "Debug") -endif() - -################ WINDOWS ################## -# Set some compiler options for Windows -# required for libopenshot-audio headers -if (WIN32) - add_definitions( -DIGNORE_JUCE_HYPOT=1 ) - set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -include cmath") -endif() - -if (APPLE) - # If you still get errors compiling with GCC 4.8, mac headers need to be patched: http://hamelot.co.uk/programming/osx-gcc-dispatch_block_t-has-not-been-declared-invalid-typedef/ - set_property(GLOBAL PROPERTY JUCE_MAC "JUCE_MAC") - set(EXTENSION "mm") - set(JUCE_PLATFORM_SPECIFIC_DIR build/macosx/platform_specific_code) - set(JUCE_PLATFORM_SPECIFIC_LIBRARIES "-framework Carbon -framework Cocoa -framework CoreFoundation -framework CoreAudio -framework CoreMidi -framework IOKit -framework AGL -framework AudioToolbox -framework QuartzCore -lobjc -framework Accelerate") - - # Prevent compiling with __cxx11 - add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) -endif() - -################ IMAGE MAGICK ################## -# Set the Quantum Depth that ImageMagick was built with (default to 16 bits) -IF (MAGICKCORE_QUANTUM_DEPTH) - add_definitions( -DMAGICKCORE_QUANTUM_DEPTH=${MAGICKCORE_QUANTUM_DEPTH} ) -ELSE (MAGICKCORE_QUANTUM_DEPTH) - add_definitions( -DMAGICKCORE_QUANTUM_DEPTH=16 ) -ENDIF (MAGICKCORE_QUANTUM_DEPTH) -IF (MAGICKCORE_HDRI_ENABLE) - add_definitions( -DMAGICKCORE_HDRI_ENABLE=${MAGICKCORE_HDRI_ENABLE} ) -ELSE (MAGICKCORE_HDRI_ENABLE) - add_definitions( -DMAGICKCORE_HDRI_ENABLE=0 ) -ENDIF (MAGICKCORE_HDRI_ENABLE) - -# Find the ImageMagick++ library -find_package(ImageMagick COMPONENTS Magick++ MagickWand MagickCore) -if (ImageMagick_FOUND) - # Include ImageMagick++ headers (needed for compile) - include_directories(${ImageMagick_INCLUDE_DIRS}) - - # define a global var (used in the C++) - add_definitions( -DUSE_IMAGEMAGICK=1 ) - list(APPEND CMAKE_SWIG_FLAGS "-DUSE_IMAGEMAGICK=1") - - set(HAVE_IMAGEMAGICK TRUE CACHE BOOL "Building with ImageMagick support" FORCE) - mark_as_advanced(HAVE_IMAGEMAGICK) -endif() - -################# LIBOPENSHOT-AUDIO ################### -# Find JUCE-based openshot Audio libraries -find_package(OpenShotAudio 0.2.0 REQUIRED) - -# Include Juce headers (needed for compile) -include_directories(${LIBOPENSHOT_AUDIO_INCLUDE_DIRS}) - -################# BLACKMAGIC DECKLINK ################### -# Find BlackMagic DeckLinkAPI libraries -if (ENABLE_BLACKMAGIC) - - find_package(BlackMagic) - - if (BLACKMAGIC_FOUND) - # Include Blackmagic headers (needed for compile) - include_directories(${BLACKMAGIC_INCLUDE_DIR}) - - # define a global var (used in the C++) - add_definitions( -DUSE_BLACKMAGIC=1 ) - list(APPEND CMAKE_SWIG_FLAGS "-DUSE_BLACKMAGIC=1") - endif() - -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") @@ -260,7 +134,6 @@ set(EFFECTS_SOURCES effects/Pixelate.cpp effects/Saturation.cpp effects/Shift.cpp - effects/Wave.cpp) # Qt video player components @@ -357,23 +230,6 @@ if(ImageMagick_FOUND) target_compile_definitions(openshot PUBLIC USE_IMAGEMAGICK=1) list(APPEND CMAKE_SWIG_FLAGS -DUSE_IMAGEMAGICK=1) -# OpenCV related files -if (OpenCV_FOUND) - target_sources(openshot PRIVATE - ${OPENSHOT_CV_SOURCES} - ${PROTOBUF_MESSAGES}) -endif() - - -# Location of our includes, both internally and when installed -target_include_directories(openshot - PRIVATE - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_BINARY_DIR}/include - PUBLIC - $ - $ - $) # Link with ImageMagick library target_link_libraries(openshot PUBLIC ImageMagick::Magick++) @@ -538,20 +394,65 @@ if (ENABLE_BLACKMAGIC) endif() 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() + + # compiling protobuf messages + 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() + + # Add OpenCV target sources + target_sources(openshot PRIVATE + ${OPENSHOT_CV_SOURCES} + ${PROTOBUF_MESSAGES}) + + # Link libopenshot with OpenCV libs + target_link_libraries(openshot PUBLIC ${OpenCV_LIBS} ${PROTOBUF_LIBRARY}) + +endif() + ############### LINK LIBRARY ################# # Link remaining dependency libraries if(DEFINED PROFILER) target_link_libraries(openshot PUBLIC ${PROFILER}) endif() -if(BLACKMAGIC_FOUND) - target_link_libraries(openshot PUBLIC ${BLACKMAGIC_LIBRARY_DIR}) -endif() - -if (OpenCV_FOUND) - target_link_libraries(openshot PUBLIC ${OpenCV_LIBS} ${PROTOBUF_LIBRARY}) -endif() - if(WIN32) # Required for exception handling on Windows target_link_libraries(openshot PUBLIC "imagehlp" "dbghelp" ) @@ -561,20 +462,6 @@ endif() ### INSTALL HEADERS & LIBRARY ### - -############### TEST BLACKMAGIC CAPTURE APP ################ -if (BLACKMAGIC_FOUND) - # Create test executable - add_executable(openshot-blackmagic - examples/ExampleBlackmagic.cpp) - - # Link test executable to the new library - target_link_libraries(openshot-blackmagic openshot) -endif() - - -############### INSTALL HEADERS & LIBRARY ################ - # Install primary library install(TARGETS openshot ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index 2e531a4d..1ef1d821 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -30,12 +30,8 @@ #include "CVObjectDetection.h" -// // Initialize the parameters -// float confThreshold = 0.5; // Confidence threshold -// float nmsThreshold = 0.4; // Non-maximum suppression threshold -// int inpWidth = 416; // Width of network's input image -// int inpHeight = 416; // Height of network's input image -// vector classes; +using namespace openshot; + CVObjectDetection::CVObjectDetection(std::string processInfoJson, ProcessingController &processingController) : processingController(&processingController), processingDevice("CPU"){ @@ -98,7 +94,7 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, // Update progress processingController->SetProgress(uint(100*(frame_number-start)/(end-start))); - std::cout<<"Frame: "< _classIds, std::vector _confidences, std::vector> _boxes, size_t _frameId){ - classIds = _classIds; - confidences = _confidences; - boxes = _boxes; - frameId = _frameId; - } - size_t frameId; - std::vector classIds; - std::vector confidences; - std::vector> boxes; -}; + // Stores the detected object bounding boxes and its properties. + struct CVDetectionData{ + CVDetectionData(){} + CVDetectionData(std::vector _classIds, std::vector _confidences, std::vector> _boxes, size_t _frameId){ + classIds = _classIds; + confidences = _confidences; + boxes = _boxes; + frameId = _frameId; + } + size_t frameId; + std::vector classIds; + std::vector confidences; + std::vector> boxes; + }; -class CVObjectDetection{ + /** + * @brief This class runs trought a clip to detect objects and returns the bounding boxes and its properties. + * + * Object detection is performed using YoloV3 model with OpenCV DNN module + */ + class CVObjectDetection{ - private: - - cv::dnn::Net net; - std::vector classNames; - float confThreshold, nmsThreshold; + private: + + cv::dnn::Net net; + std::vector classNames; + float confThreshold, nmsThreshold; - std::string classesFile; - std::string modelConfiguration; - std::string modelWeights; - std::string processingDevice; - std::string protobuf_data_path; + std::string classesFile; + std::string modelConfiguration; + std::string modelWeights; + std::string processingDevice; + std::string protobuf_data_path; - SortTracker sort; + SortTracker sort; - uint progress; + uint progress; - size_t start; - size_t end; + size_t start; + size_t end; - /// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes - ProcessingController *processingController; + /// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes + ProcessingController *processingController; - void setProcessingDevice(); + void setProcessingDevice(); + + // Detect onbects on a single frame + void DetectObjects(const cv::Mat &frame, size_t frame_number); - void DetectObjects(const cv::Mat &frame, size_t frame_number); + bool iou(cv::Rect pred_box, cv::Rect sort_box); - bool iou(cv::Rect pred_box, cv::Rect sort_box); + // Remove the bounding boxes with low confidence using non-maxima suppression + void postprocess(const cv::Size &frameDims, const std::vector& out, size_t frame_number); - // Remove the bounding boxes with low confidence using non-maxima suppression - void postprocess(const cv::Size &frameDims, const std::vector& out, size_t frame_number); + // Get the names of the output layers + std::vector getOutputsNames(const cv::dnn::Net& net); - // Get the names of the output layers - std::vector getOutputsNames(const cv::dnn::Net& net); + public: - public: + std::map detectionsData; - std::map detectionsData; + CVObjectDetection(std::string processInfoJson, ProcessingController &processingController); - CVObjectDetection(std::string processInfoJson, ProcessingController &processingController); + // Iterate over a clip object and run inference for each video frame + void detectObjectsClip(openshot::Clip &video, size_t start=0, size_t end=0, bool process_interval=false); - void detectObjectsClip(openshot::Clip &video, size_t start=0, size_t end=0, bool process_interval=false); + CVDetectionData GetDetectionData(size_t frameId); - CVDetectionData GetDetectionData(size_t frameId); + /// Protobuf Save and Load methods + // Save protobuf file + bool SaveObjDetectedData(); + // Add frame object detection data into protobuf message. + void AddFrameDataToProto(libopenshotobjdetect::Frame* pbFrameData, CVDetectionData& dData); - /// Protobuf Save and Load methods - // Save protobuf file - bool SaveObjDetectedData(); - // Add frame object detection data into protobuf message. - void AddFrameDataToProto(libopenshotobjdetect::Frame* pbFrameData, CVDetectionData& dData); + /// Get and Set JSON methods + void SetJson(const std::string value); ///< Load JSON string into this object + void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object - /// Get and Set JSON methods - void SetJson(const std::string value); ///< Load JSON string into this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + // Load protobuf file (ONLY FOR MAKE TEST) + bool _LoadObjDetectdData(); + }; - // Load protobuf file (ONLY FOR MAKE TEST) - bool _LoadObjDetectdData(); -}; +} diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp index 6f589031..121bf189 100644 --- a/src/CVStabilization.cpp +++ b/src/CVStabilization.cpp @@ -30,6 +30,9 @@ #include "CVStabilization.h" +using namespace openshot; + + // Set default smoothing window value to compute stabilization CVStabilization::CVStabilization(std::string processInfoJson, ProcessingController &processingController) : processingController(&processingController){ @@ -206,7 +209,6 @@ std::vector CVStabilization::ComputeFramesTrajectory(){ // Save trajectory data to vector trajectory.push_back(CamTrajectory(x,y,a)); } - return trajectory; } @@ -269,7 +271,6 @@ std::map CVStabilization::GenNewCamPosition(std::map trackedDataById; // Save tracked data - std::string trackerType; // Name of the chosen tracker - cv::Ptr tracker; // Pointer of the selected tracker + /** + * @brief The tracker class will receive one bounding box provided by the user and then iterate over the clip frames + * to return the object position in all the frames. + */ + class CVTracker { + private: + std::map trackedDataById; // Save tracked data + std::string trackerType; // Name of the chosen tracker + cv::Ptr tracker; // Pointer of the selected tracker - cv::Rect2d bbox; // Bounding box coords - SortTracker sort; + cv::Rect2d bbox; // Bounding box coords + SortTracker sort; - std::string protobuf_data_path; // Path to protobuf data file + std::string protobuf_data_path; // Path to protobuf data file - uint progress; // Pre-processing effect progress + uint progress; // Pre-processing effect progress - /// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes - ProcessingController *processingController; + /// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes + ProcessingController *processingController; - bool json_interval; - size_t start; - size_t end; - + bool json_interval; + size_t start; + size_t end; + + // Initialize the tracker + bool initTracker(cv::Mat &frame, size_t frameId); + + // Update the object tracker according to frame + bool trackFrame(cv::Mat &frame, size_t frameId); - // Initialize the tracker - bool initTracker(cv::Mat &frame, size_t frameId); - - // Update the object tracker according to frame - bool trackFrame(cv::Mat &frame, size_t frameId); + public: - public: + // Constructor + CVTracker(std::string processInfoJson, ProcessingController &processingController); + + // Set desirable tracker method + cv::Ptr selectTracker(std::string trackerType); - // Constructor - CVTracker(std::string processInfoJson, ProcessingController &processingController); - - // Set desirable tracker method - cv::Ptr selectTracker(std::string trackerType); + // Track object in the hole clip or in a given interval + // If start, end and process_interval are passed as argument, clip will be processed in [start,end) + void trackClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false); - // Track object in the hole clip or in a given interval - // If start, end and process_interval are passed as argument, clip will be processed in [start,end) - void trackClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false); - - // Get tracked data for a given frame - FrameData GetTrackedData(size_t frameId); - - /// Protobuf Save and Load methods - // Save protobuf file - bool SaveTrackedData(); - // Add frame tracked data into protobuf message. - void AddFrameDataToProto(libopenshottracker::Frame* pbFrameData, FrameData& fData); - - /// Get and Set JSON methods - void SetJson(const std::string value); ///< Load JSON string into this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object - - // Load protobuf file (ONLY FOR MAKE TEST) - bool _LoadTrackedData(); -}; + // Get tracked data for a given frame + FrameData GetTrackedData(size_t frameId); + + /// Protobuf Save and Load methods + // Save protobuf file + bool SaveTrackedData(); + // Add frame tracked data into protobuf message. + void AddFrameDataToProto(libopenshottracker::Frame* pbFrameData, FrameData& fData); + /// Get and Set JSON methods + void SetJson(const std::string value); ///< Load JSON string into this object + void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + // Load protobuf file (ONLY FOR MAKE TEST) + bool _LoadTrackedData(); + }; +} #endif \ No newline at end of file diff --git a/src/Clip.h b/src/Clip.h index 9bcb18bb..0b6d7ee8 100644 --- a/src/Clip.h +++ b/src/Clip.h @@ -72,7 +72,6 @@ namespace openshot { return false; }}; - /** * @brief This class represents a clip (used to arrange readers on the timeline) * @@ -200,8 +199,6 @@ namespace openshot { /// Return the type name of the class std::string Name() override { return "Clip"; }; - - /// @brief Add an effect to the clip /// @param effect Add an effect to the clip. An effect can modify the audio or video of an openshot::Frame. void AddEffect(openshot::EffectBase* effect); @@ -266,9 +263,6 @@ namespace openshot { bool Waveform() { return waveform; } ///< Get the waveform property of this clip void Waveform(bool value) { waveform = value; } ///< Set the waveform property of this clip - /// Stabilize the clip using opencv and opticalflow - //void stabilize_video(); - // Scale, Location, and Alpha curves openshot::Keyframe scale_x; ///< Curve representing the horizontal scaling in percent (0 to 1) openshot::Keyframe scale_y; ///< Curve representing the vertical scaling in percent (0 to 1) diff --git a/src/Frame.cpp b/src/Frame.cpp index 3dce9263..b32a7d20 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -968,13 +968,13 @@ cv::Mat Frame::GetImageCV() std::shared_ptr Frame::Mat2Qimage(cv::Mat img){ cv::cvtColor(img, img, cv::COLOR_BGR2RGB); - QImage qimg((uchar*) img.data, img.cols, img.rows, img.step, QImage::Format_RGB888); + QImage qimg((uchar*) img.data, img.cols, img.rows, img.step, QImage::Format_RGBA8888_Premultiplied); std::shared_ptr imgIn = std::make_shared(qimg.copy()); // Always convert to RGBA8888 (if different) - if (imgIn->format() != QImage::Format_RGBA8888) - *imgIn = imgIn->convertToFormat(QImage::Format_RGBA8888); + if (imgIn->format() != QImage::Format_RGBA8888_Premultiplied) + *imgIn = imgIn->convertToFormat(QImage::Format_RGBA8888_Premultiplied); return imgIn; } diff --git a/src/Frame.h b/src/Frame.h index d73d0c9e..e241555e 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -107,7 +107,7 @@ namespace openshot class Frame { private: - std::shared_ptr image; ///< RGBA Format + std::shared_ptr image; std::shared_ptr wave_image; std::shared_ptr audio; std::shared_ptr previewApp; diff --git a/src/effects/ObjectDetection.h b/src/effects/ObjectDetection.h index 058252f3..ac528ef6 100644 --- a/src/effects/ObjectDetection.h +++ b/src/effects/ObjectDetection.h @@ -42,6 +42,7 @@ #include "../KeyFrame.h" #include "../objdetectdata.pb.h" +// Struct that stores the detected bounding boxes for all the clip frames struct DetectionData{ DetectionData(){} DetectionData(std::vector _classIds, std::vector _confidences, std::vector> _boxes, size_t _frameId){ @@ -58,12 +59,8 @@ struct DetectionData{ namespace openshot { - /** - * @brief This class stabilizes video clip to remove undesired shaking and jitter. - * - * Adding stabilization is useful to increase video quality overall, since it removes - * from subtle to harsh unexpected camera movements. + * @brief This effect displays all the detected objects on a clip. */ class ObjectDetection : public EffectBase { @@ -81,7 +78,6 @@ namespace openshot public: - /// Blank constructor, useful when using Json to load the effect properties ObjectDetection(std::string clipTrackerDataPath); diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index f08053b6..daac6077 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -46,6 +46,7 @@ using namespace std; using google::protobuf::util::TimeUtil; +// Store the relative transformation parameters between consecutive frames struct EffectTransformParam { EffectTransformParam() {} @@ -60,6 +61,7 @@ struct EffectTransformParam double da; // angle }; +// Stores the global camera trajectory for one frame struct EffectCamTrajectory { EffectCamTrajectory() {} diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index 2d51dcc5..abc816e1 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -78,7 +78,6 @@ struct EffectFrameData{ namespace openshot { - /** * @brief This class track a given object through the clip and, when called, draws a box surrounding it. * diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7f453ce1..419b9750 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -101,7 +101,6 @@ set(OPENSHOT_CV_TEST_FILES # CVObjectDetection_Tests.cpp ) - ################ TESTER EXECUTABLE ################# # Create unit test executable (openshot-test) message (STATUS "Tests enabled, test executable will be built as tests/openshot-test") @@ -117,14 +116,12 @@ if (OpenCV_FOUND) else() add_executable(openshot-test tests.cpp - ${OPENSHOT_TEST_FILES}) + ${OPENSHOT_TEST_FILES} ) # Link libraries to the new executable target_link_libraries(openshot-test openshot ${UnitTest++_LIBRARIES}) endif() - - ##### RUNNING TESTS (make os_test / make test) ##### # Hook up the 'make os_test' target to the 'openshot-test' executable add_custom_target(os_test COMMAND openshot-test)