Commit Graph

245 Commits

Author SHA1 Message Date
01340a0a81 Refactor and streamline template matching logic in VideoEditor
This commit removes unused methods and simplifies the template matching process by eliminating multi-scale matching in favor of a single-scale approach. The changes enhance performance and clarity in the tracking logic, ensuring a more efficient template matching experience. Debug messages have been updated to reflect the current state of the template matching process.
2025-09-26 18:30:19 +02:00
44ed4220b9 Refactor template matching logic in VideoEditor to support full frame and cropped modes
This commit introduces a toggle for template matching modes in the VideoEditor, allowing users to choose between full frame and cropped region matching. The logic has been updated to handle both modes effectively, improving flexibility and performance during template tracking. Additionally, the multi-scale template matching feature has been removed, streamlining the template matching process. Debug messages and feedback have been enhanced to reflect the current mode, ensuring better user experience during video editing sessions.
2025-09-26 18:20:12 +02:00
151744d144 Update 2025-09-26 17:56:28 +02:00
e823a11929 Enhance template matching in VideoEditor by applying motion tracking offsets
This commit updates the template matching logic in the VideoEditor to apply motion tracking offsets to the current frame before performing template matching. The new method, _apply_motion_tracking_offset, creates an offset frame based on the base position, improving tracking accuracy. This change simplifies the process by removing the previous cropping logic and ensures that template matching works effectively on the adjusted frame, enhancing overall performance during video editing sessions.
2025-09-26 17:54:56 +02:00
c1c01e86ca Optimize template matching in VideoEditor to utilize cropped regions for improved performance
This commit modifies the template matching logic in the VideoEditor to use only the cropped region of the frame when available, significantly enhancing the speed of template tracking. If no crop is applied, the original frame is used for tracking. This change improves the efficiency of the template matching process while maintaining accuracy in locating objects during video editing sessions.
2025-09-26 17:52:09 +02:00
184aceeee3 Enhance template selection and tracking logic in VideoEditor
This commit introduces a mechanism to select the best template for the current frame if templates are available. Additionally, it updates the template matching process to apply tracking directly on the original frame, avoiding infinite recursion and improving tracking accuracy. These changes enhance the overall functionality and reliability of the template management system during video editing sessions.
2025-09-26 17:50:07 +02:00
db2aa57ce5 Refactor template matching logic in VideoEditor to utilize transformed frames
This commit updates the template matching process in the VideoEditor to apply tracking on the already transformed frame, which includes crop, zoom, and rotation adjustments. This change enhances tracking accuracy by ensuring that the template can locate the object in its modified position, while also improving code clarity and performance during video editing sessions.
2025-09-26 17:49:29 +02:00
92c2e62166 Refactor template matching logic in VideoEditor to use original frame for tracking
This commit updates the template matching process in the VideoEditor to apply tracking directly on the original frame instead of a cropped region. This change ensures that the template can accurately locate the object in its original position, improving tracking reliability. The code has been simplified by removing the previous cropping logic, enhancing overall clarity and performance during video editing sessions.
2025-09-26 17:45:19 +02:00
86c31a49d9 Refactor template management in VideoEditor to enhance tracking functionality
This commit removes the initial template selection logic from the tracking method and introduces a mechanism to disable template matching when no templates are available. Additionally, it updates the comments to clarify the enabling of template matching upon template creation, improving the overall management of templates during video editing sessions.
2025-09-26 17:42:30 +02:00
f5b8656bc2 Refactor template navigation methods in VideoEditor for improved functionality
This commit renames and updates the template navigation methods in the VideoEditor to enhance user experience. The methods now allow users to jump directly to the previous or next template markers, improving frame handling and feedback. Debug messages have been added to provide clearer insights during navigation, ensuring users are informed about the current actions and template positions.
2025-09-26 17:39:02 +02:00
b9c60ffc25 Refactor template dot rendering and right-click functionality in VideoEditor
This commit simplifies the rendering of template dots in the VideoEditor by standardizing their appearance to match motion tracking points. Additionally, it enhances the right-click functionality to allow for template removal when clicking near template centers, improving user interaction and feedback during video editing sessions.
2025-09-26 17:37:35 +02:00
b6c7863b77 Refactor template navigation in VideoEditor for improved frame handling and user feedback
This commit updates the navigation methods for templates in the VideoEditor, enhancing the logic to jump to the start frame of the selected template. The feedback messages have been improved to provide clearer information about the selected template and its corresponding frame. Additionally, visual indicators for active templates have been added, allowing users to easily identify which templates are currently in use during video editing sessions.
2025-09-26 17:34:27 +02:00
612d024161 Update VideoEditor to manage template lifecycle and improve frame handling
This commit enhances the VideoEditor by implementing logic to end the previous template at the current frame when a new template is added. It also updates the method for retrieving the best template for a given frame to prioritize the most recent template. Additionally, a new method is introduced to recreate templates from their data region, ensuring templates are correctly initialized when needed. These changes improve template management and user feedback during video editing sessions.
2025-09-26 17:31:34 +02:00
840440eb1a Add multiple templates management to VideoEditor
This commit introduces a system for managing multiple templates within the VideoEditor. Users can now add, remove, and navigate through templates, enhancing the flexibility of template tracking. The state management has been updated to save and load multiple templates, including their regions and frame ranges. Additionally, visual indicators for active templates have been implemented in the frame display, improving user feedback during editing sessions.
2025-09-26 17:23:04 +02:00
c3bf49f301 Implement fullscreen scaling for video display in VideoEditor
This commit adds functionality to scale down the video display when in fullscreen mode if the video dimensions exceed the available screen size. This enhancement ensures that videos are properly displayed within the window dimensions, improving user experience during video editing.
2025-09-26 15:22:57 +02:00
192a5c7124 Disable multi-scale template matching by default in VideoEditor and update state management
This commit changes the default setting for multi-scale template matching to false, streamlining the initial configuration. It also updates the state management to include the multi-scale setting, ensuring that the user's preference is preserved across sessions. Additionally, the display information has been enhanced to reflect the current template matching status, improving user feedback during video editing.
2025-09-26 14:59:30 +02:00
2246ef9f45 Enable multi-scale template matching in VideoEditor with toggle functionality
This commit introduces a toggle for multi-scale template matching, allowing users to switch between multi-scale and single-scale approaches for improved tracking accuracy. The default setting is now multi-scale, enhancing the template matching process by evaluating templates at various sizes. Additionally, debug messages and user feedback have been updated to reflect this new feature.
2025-09-26 14:56:06 +02:00
c52d9b9399 Enhance template matching in VideoEditor with multi-scale approach and adaptive thresholding
This commit introduces a multi-scale template matching technique to improve tracking accuracy by evaluating templates at various sizes. Additionally, it implements adaptive thresholding based on recent match confidences, allowing for more dynamic and responsive matching criteria. A new method for image preprocessing is also added to enhance contrast and reduce noise, further optimizing the template matching process.
2025-09-26 14:53:16 +02:00
10284dad81 Implement template matching position retrieval in VideoEditor
This commit introduces a new method to get the template matching position and confidence for a specific frame. It optimizes the tracking process by utilizing cropped regions for faster template matching while maintaining functionality for full frame matching when no crop is set. Additionally, it updates the rendering logic to visualize the template matching point on the canvas, enhancing user feedback with confidence levels displayed. This update improves the overall accuracy and efficiency of the template matching feature.
2025-09-26 14:51:04 +02:00
a2dc4a2186 Refactor tracking position calculation in VideoEditor to compute the average of all available positions from manual, template, and feature tracking methods. This change simplifies the logic by aggregating positions instead of calculating weighted offsets, enhancing accuracy and clarity in tracking results. Debug messages have been updated to reflect the new averaging process. 2025-09-26 14:48:17 +02:00
5d76681ded Refactor tracking position calculation in VideoEditor to combine manual, template, and feature tracking methods. This update introduces a more robust approach to determine the final tracking position by calculating offsets from both template matching and feature tracking, weighted appropriately against a base position derived from manual tracking points. The logic ensures smoother transitions and improved accuracy in tracking results, with debug messages added for better insight into the combined tracking process. 2025-09-26 14:44:19 +02:00
f8acef2da4 Update VideoEditor to set current display frame during rendering for improved motion tracking
This commit adds functionality to store the current display frame and update the current frame index during the rendering process. This enhancement supports better motion tracking by ensuring the correct frame is referenced, contributing to more accurate processing of video frames.
2025-09-26 14:37:23 +02:00
65b80034cb Enhance template matching in VideoEditor by utilizing cropped regions for improved speed and accuracy. This update modifies the tracking logic to prioritize cropped areas for faster processing, while maintaining functionality for full frame matching when no crop is set. Debug messages have been refined to provide clearer insights into tracking results and confidence levels. 2025-09-26 14:35:51 +02:00
5400592afd Refactor template matching in VideoEditor to use raw frame coordinates for improved accuracy. This update simplifies the tracking logic by directly utilizing the raw display frame, eliminating unnecessary transformations. Additionally, it enhances the template setting process by ensuring the selected region is correctly mapped to raw frame coordinates, improving usability and feedback during template selection. Debug messages have been updated to reflect these changes. 2025-09-26 14:34:48 +02:00
e6616ed1b1 Optimize template matching in VideoEditor by utilizing cropped regions for faster processing. This update modifies the tracking logic to first check for a defined crop rectangle, allowing for quicker template matching on smaller frames. If no crop is set, the full frame is used, maintaining the previous functionality. Debug messages remain to assist in tracking accuracy and confidence levels. 2025-09-26 14:33:36 +02:00
048e8ef033 Refactor template management in VideoEditor to improve tracking functionality
This commit removes the direct storage of the tracking template and introduces a method to recreate the template from the specified region when needed. It enhances the template tracking logic by ensuring that the template is dynamically generated based on the current frame and region, improving accuracy and usability. Debug messages have been added to assist in tracking the template recreation process.
2025-09-26 14:31:35 +02:00
c08d5c5999 Refactor template tracking in VideoEditor to use raw display frame
This commit modifies the template tracking logic in the VideoEditor to utilize the raw display frame instead of applying transformations, improving accuracy in tracking. It updates the coordinate mapping to account for various rotation angles, ensuring correct positioning of the tracked template. This enhancement streamlines the tracking process and enhances overall functionality.
2025-09-26 14:29:50 +02:00
8c1efb1b05 Add template selection rectangle visualization in VideoEditor
This commit introduces a new feature in the VideoEditor that allows users to visualize the template selection rectangle on the canvas. The rectangle is drawn in magenta, enhancing the user interface and providing clearer feedback during template selection. This update complements the existing functionality for selective feature deletion and improves overall usability.
2025-09-26 14:27:40 +02:00
f942392fb3 Enhance VideoEditor with template matching state management and user interaction updates
This commit adds functionality to manage the state of template matching in the VideoEditor, including loading and saving template matching settings. It also updates user interaction for selecting template regions, changing the control scheme from Alt+Right-click to Ctrl+Left-click for better usability. Additionally, it improves the handling of the current display frame during feature extraction, ensuring robustness in the tracking process.
2025-09-26 14:26:42 +02:00
c749d9af80 Add template matching tracking to VideoEditor
This commit introduces a new tracking method using template matching, enhancing the tracking capabilities of the VideoEditor. It includes the ability to set a tracking template from a selected region, track the template in the current frame, and toggle template matching on and off. Additionally, debug messages have been added to provide insights during the template tracking process, improving user experience and functionality.
2025-09-26 14:24:31 +02:00
71e5870306 Enhance feature tracking with smooth interpolation and center calculation
This commit improves the feature tracking logic in the VideoEditor by implementing smooth interpolation between feature positions across frames. It introduces methods to calculate the center of features for a given frame, ensuring a more fluid tracking experience. These enhancements provide better continuity in feature tracking, particularly when features are sparse, and improve overall user experience.
2025-09-26 14:21:14 +02:00
e813be2890 Improve feature tracking logic and debugging in VideoEditor
This commit refines the feature tracking process by enhancing the get_tracking_position method to handle cases where frame features are missing. It also adds detailed debug messages throughout the VideoEditor class, particularly during frame seeking and feature interpolation, to provide better insights into the feature availability and interpolation process. These changes improve the robustness and user experience of the feature tracking functionality.
2025-09-26 14:19:42 +02:00
80fb35cced Implement feature interpolation and gap filling in optical flow tracking
This commit introduces methods for interpolating features between frames and filling gaps in feature tracking using linear interpolation. It enhances the optical flow tracking capabilities by ensuring continuity of features across frames. Debug messages have been added to provide insights during the interpolation process, improving the overall functionality and user experience in the VideoEditor.
2025-09-26 14:14:15 +02:00
d8b4439382 Add optical flow tracking for feature tracking in VideoEditor
This commit introduces a new method for tracking features using Lucas-Kanade optical flow, enhancing the feature tracking capabilities. It includes logic to toggle optical flow tracking, store previous frames for flow calculations, and update feature positions based on optical flow results. Debug messages have been added to provide insights during the tracking process, improving user experience and functionality.
2025-09-26 14:11:05 +02:00
463228baf5 Enhance feature tracking to handle descriptor dimension mismatches
This commit updates the feature tracking logic to check for descriptor dimension mismatches when adding features to existing entries. If a mismatch is detected, existing features are replaced instead of concatenated, ensuring data integrity. Additionally, debug messages have been added to provide better insights during the feature extraction process, improving overall user experience.
2025-09-26 14:04:25 +02:00
e7571a78f4 Refactor feature extraction to handle SURF fallback and add features from regions
This commit updates the feature extraction process to provide a fallback to SIFT when SURF is not available, enhancing robustness. It introduces a new method to extract features from specific regions of a frame, allowing for the addition of features to existing ones. Feedback messages have been improved to reflect these changes, ensuring better user experience and clarity during feature extraction.
2025-09-26 14:00:01 +02:00
ea008ba23c Implement shift-right click and ctrl-right click for feature extraction 2025-09-26 13:57:00 +02:00
366c338c5d Finally reinvent the whole mapping procedure again! 2025-09-26 13:54:01 +02:00
0d26ffaca4 Refactor feature extraction to directly use rotated frame coordinates in VideoEditor
This commit updates the feature extraction process to store and utilize features in rotated frame coordinates, aligning with existing motion tracking methods. It simplifies the coordinate mapping logic by removing unnecessary transformations, enhancing the accuracy of feature tracking. Additionally, feedback messages have been refined to reflect the changes in feature extraction, improving user experience.
2025-09-26 13:43:42 +02:00
aaf78bf0da Refactor feature extraction to utilize transformed frames in VideoEditor
This commit enhances the feature extraction process by ensuring that features are extracted from the transformed frame that users see, accounting for all transformations such as cropping, zooming, and rotation. It simplifies the coordinate mapping logic, allowing for accurate feature tracking without the need for manual coordinate adjustments. Feedback messages have been updated to reflect the extraction from the visible area, improving user experience.
2025-09-26 13:40:10 +02:00
43d350fff2 Refactor feature extraction to support cropping in VideoEditor
This commit updates the feature extraction process to handle cropped regions of the original frame, allowing for more accurate feature tracking based on the visible area. It introduces logic to extract features from both cropped and full frames, ensuring that coordinates are correctly mapped back to the original frame space. Feedback messages have been enhanced to inform users about the success or failure of feature extraction, improving the overall user experience.
2025-09-26 13:37:41 +02:00
d1b9e7c470 Enhance feature extraction with coordinate mapping in VideoEditor
This commit modifies the feature extraction process to include a coordinate mapper, allowing for accurate mapping of features from transformed frames back to their original coordinates. It introduces new methods for handling coordinate transformations during cropping and rotation, ensuring that features are correctly stored and retrieved in the appropriate frame space. This improvement enhances the tracking accuracy and overall functionality of the VideoEditor.
2025-09-26 13:24:48 +02:00
c50234f5c1 Refactor feature extraction to use transformed frames in VideoEditor
This commit updates the feature extraction process to utilize the transformed frames that users see, rather than the original frames. It includes a new method for mapping coordinates from transformed frames back to original coordinates, ensuring accurate tracking. Additionally, feedback messages have been improved to reflect the success or failure of feature extraction based on the visible area.
2025-09-26 13:21:59 +02:00
171155e528 Change some fucking keys it invented 2025-09-26 13:13:53 +02:00
710a1f7de3 Maybe implement a feature tracker 2025-09-26 13:10:47 +02:00
13fbc45b74 Add special case for _edited files for cleaner 2025-09-26 11:12:35 +02:00
8b4f8026cc Make cleaner work with all date videos 2025-09-26 11:08:15 +02:00
5c66935157 Add UTF-8 image loading support in VideoEditor and update dependencies 2025-09-26 11:05:14 +02:00
bae760837c Refactor display logic in MediaGrader to maintain aspect ratio and improve frame rendering
This commit enhances the display functionality by calculating the available height for video timelines, resizing frames while preserving their aspect ratio, and centering them on a canvas. The window resizing logic has been updated to ensure the entire monitor space is utilized effectively, improving the visual presentation of media files.
2025-09-26 10:59:15 +02:00
4a1649a568 Implement Cv2BufferedCap for improved video frame handling
This commit introduces the Cv2BufferedCap class, which optimizes video frame loading, seeking, and caching. The MediaGrader class has been updated to utilize this new class, enhancing frame accuracy and playback performance. Additionally, configuration constants have been adjusted for better playback speed control, and redundant backend handling has been removed to streamline video loading. Overall, these changes improve the efficiency and reliability of video playback in the application.
2025-09-19 18:23:15 +02:00