Commit Graph

146 Commits

Author SHA1 Message Date
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
5c66935157 Add UTF-8 image loading support in VideoEditor and update dependencies 2025-09-26 11:05:14 +02:00
ea1a6e58f4 Enhance image and screenshot saving quality in VideoEditor
This commit updates the image and screenshot saving functionality in the VideoEditor class to use high-quality JPEG settings. The JPEG quality is set to 95, ensuring better image fidelity when saving processed frames and static images.
2025-09-19 07:17:52 +02:00
0c3e5e21bf Increase window dimensions in ProjectView and VideoEditor to accommodate 1080p videos. Adjust resizing logic to maintain original video quality by resizing the window instead of downscaling the video. Ensure frames fit within canvas bounds for better display. 2025-09-19 07:14:41 +02:00
472efbb9d9 Fix up speed controls to be ws and save to be S 2025-09-18 18:07:23 +02:00
dd2f40460b Max speed at 1 2025-09-18 17:59:55 +02:00
b2c7cf11e9 Fix seeking blyat 2025-09-18 17:58:04 +02:00
e0e5c8d933 Fix autorepeat 2025-09-18 17:54:06 +02:00
04e391551e Remove unused trash 2025-09-18 17:51:29 +02:00
f9f442a2d0 "optimnize" playback by removing retardation 2025-09-18 17:49:09 +02:00
0fd108bc9a Don't seek EVERY GOD DAMN FUCKING FRAME 2025-09-18 17:31:10 +02:00
83ef71934b Enhance tracking marker navigation in VideoEditor
This commit improves the navigation logic in the VideoEditor class for jumping to previous and next tracking markers. It ensures that when at the beginning of the tracking frames, the user jumps to the first marker, and when at the end, they jump to the last marker. Debug statements have been updated to reflect these changes, providing clearer insights during navigation. The specification has also been updated to document the new behavior.
2025-09-17 19:55:31 +02:00
b123b12d0d Refactor motion path logic in VideoEditor for clarity
This commit updates the VideoEditor class to improve the logic for drawing and checking motion paths between tracking points. The comments have been adjusted to clarify the conditions for drawing lines between previous→current and previous→next frames. Additionally, debug statements have been enhanced to provide clearer insights during the snapping process, ensuring better tracking point interactions.
2025-09-17 15:46:39 +02:00
1bd935646e Refactor motion path and snapping logic in VideoEditor
This commit enhances the VideoEditor class by refining the logic for drawing motion paths and checking line snapping between tracking points. It introduces a unified approach to handle both previous→next and previous→current lines, improving the clarity of the visual representation. Additionally, debug statements have been updated to provide better insights during the snapping process, ensuring accurate tracking point interactions. The display update method is also called to refresh the visual state after changes.
2025-09-17 15:44:55 +02:00
c3e0088a60 Refactor point-to-line distance calculation in VideoEditor
This commit refines the distance calculation method in the VideoEditor class by introducing a new function, _point_to_line_distance_and_foot, which computes the distance from a point to an infinite line and returns the foot of the perpendicular. The snapping logic has been updated to utilize this new method, enhancing the accuracy of line snapping between tracking points. Additionally, debug statements have been added to assist in tracking the snapping process and verifying point conversions.
2025-09-17 15:38:57 +02:00
68a1cc3e7d Enhance snapping functionality in VideoEditor to include line snapping
This commit improves the snapping feature in the VideoEditor class by adding the ability to snap new tracking points to the closest point on the line segment between consecutive tracking points, in addition to existing point snapping. The distance calculation logic has been refined, and the specification has been updated to reflect the new snapping behavior, which now operates within a 10px radius for both point and line snapping, enhancing the precision of motion tracking.
2025-09-17 15:12:35 +02:00
498a1911b1 Refactor constants to constants 2025-09-17 15:09:10 +02:00
d068da20f4 Remove some dead code 2025-09-17 15:08:42 +02:00
84a0748f0b Implement snapping functionality for tracking points in VideoEditor
This commit enhances the VideoEditor class by adding a snapping feature that allows users to snap new tracking points to existing points from any frame within a 50px radius. The logic first checks for the removal of existing points before determining if a new point should be added or if it should snap to a nearby point. The specification has been updated to reflect this new snapping behavior, improving the precision of motion tracking.
2025-09-17 15:05:12 +02:00
8c45b30bca Enhance VideoEditor with motion path visualization for tracking points
This commit updates the VideoEditor class to visualize the motion path between previous and next tracking points using yellow arrows. The rendering of tracking points has been modified, with previous points displayed as red circles and next points as magenta circles, both with white borders for better visibility. The specification has been updated to reflect these changes in the display of tracking points and their motion direction.
2025-09-17 14:34:26 +02:00
615a3dce0d Implement methods for retrieving previous and next tracking points in VideoEditor
This commit introduces two new methods, _get_previous_tracking_point and _get_next_tracking_point, to the VideoEditor class. These methods allow for the retrieval of tracking points from the previous and next frames that contain tracking data, enhancing navigation capabilities. The rendering logic has been updated to utilize these methods, ensuring that the previous (red) and next (green) tracking points are displayed correctly during video playback. Additionally, the specification has been updated to reflect these changes in the display of tracking points.
2025-09-17 14:29:11 +02:00
1ce05d33ba Add complete reset functionality to VideoEditor for all transformations
This commit introduces a new method, complete_reset, in the VideoEditor class, allowing users to reset all transformations and settings, including crop, zoom, rotation, brightness, contrast, and motion tracking. The method ensures a clean slate for editing by clearing the transformation cache and saving the state. Additionally, the specification has been updated to include this new functionality, enhancing user control over the editing environment.
2025-09-17 14:12:02 +02:00
1aea3b8a6e Update VideoEditor encoding settings for improved output quality
This commit modifies the encoding parameters in the VideoEditor class, changing the preset to 'veryslow' and adjusting the CRF value to 12 for enhanced video quality. Additionally, it introduces new parameters for profile and level settings, as well as x264 parameters for reference frames and B-frames, optimizing the encoding process for better performance and visual fidelity.
2025-09-17 13:55:13 +02:00
fbac3b0dbb Enhance VideoEditor mouse wheel functionality for zoom and frame seeking
This commit updates the mouse wheel event handling in the VideoEditor class to allow for zooming in and out with Ctrl+scroll, while enabling frame seeking with plain scroll. The specification has been updated to reflect the new mouse wheel behavior, improving user navigation and control during video editing.
2025-09-17 11:49:25 +02:00
ed6f809029 Refactor marker navigation in VideoEditor to utilize tracking points
This commit enhances the VideoEditor class by updating the marker navigation methods to focus on tracking points instead of cut markers. The new methods, jump_to_previous_marker and jump_to_next_marker, now utilize a sorted list of frames with tracking points, improving navigation efficiency. Additionally, the documentation has been updated to reflect these changes, providing clearer instructions for users on how to navigate using tracking markers.
2025-09-17 11:41:45 +02:00
8a7e2609c5 Add marker navigation functionality to VideoEditor
This commit introduces keyboard controls for jumping to previous and next markers (cut start or end) in the VideoEditor class. The new functionality enhances user navigation during video editing, allowing for more efficient management of cut points. This addition improves the overall editing experience by providing quick access to key markers in the timeline.
2025-09-17 11:33:40 +02:00
dd1bc12667 Add exact frame seeking functionality to VideoEditor
This commit introduces a new method, seek_video_exact_frame, in the VideoEditor class, allowing users to seek video by exactly one frame, independent of the seek multiplier. The functionality is integrated with keyboard controls for navigating to the previous and next frames, enhancing precision in video editing. This addition improves user control and responsiveness during frame navigation.
2025-09-17 11:23:48 +02:00
9c14249f88 Update VideoEditor configuration for seek multiplier settings
This commit modifies the seek multiplier settings in the VideoEditor class, increasing the SEEK_MULTIPLIER_INCREMENT from 2.0 to 4.0 and expanding the MAX_SEEK_MULTIPLIER from 100.0 to 1000.0. These changes enhance the flexibility and responsiveness of the seeking functionality during video editing.
2025-09-17 11:18:35 +02:00
47ec7fed04 Enhance VideoEditor with previous and next frame tracking point visualization
This commit adds functionality to the VideoEditor class to render tracking points from the previous and next frames with 50% alpha blending. Red circles indicate previous frame points, while green circles represent next frame points, improving the visual feedback during video editing. Additionally, the feedback message duration has been reduced for a more responsive user experience.
2025-09-17 10:42:54 +02:00
e80278a2dd Refactor frame processing in VideoEditor to enhance cropping and rotation handling
This commit updates the frame processing logic in the VideoEditor class to apply rotation before cropping, ensuring accurate handling of frames in rotated space. It introduces effective cropping that accommodates out-of-bounds scenarios by padding with black, improving the visual output during editing. Additionally, debug statements have been refined to provide clearer information on output dimensions and effective crop details, enhancing the overall user experience in video editing.
2025-09-17 09:00:14 +02:00
f1d4145e43 Implement unified display parameters in VideoEditor for improved cropping and zoom handling
This commit introduces a new method, _get_display_params, in the VideoEditor class to centralize the calculation of display parameters, including effective crop dimensions, offsets, and scaling factors. The coordinate mapping methods have been updated to utilize these unified parameters, enhancing the accuracy of point mapping between original and screen coordinates during zoom and cropping operations. This refactor improves code readability and maintainability while ensuring a consistent user experience in video editing.
2025-09-17 08:06:52 +02:00
1d987a341a Refactor visibility calculations in VideoEditor to ensure proper cropping bounds
This commit updates the visibility width and height calculations in the VideoEditor class to use the minimum of the new dimensions and the window dimensions when cropping due to zoom. This change enhances the accuracy of the displayed area during zoom operations, ensuring that the canvas scaling is correctly applied and improving the overall user experience in video editing.
2025-09-17 01:56:16 +02:00
47ce52da37 Refactor coordinate mapping in VideoEditor to improve effective crop handling
This commit updates the coordinate mapping methods in the VideoEditor class to utilize the effective crop dimensions more accurately. It clarifies the calculations for mapping points between rotated frame coordinates and screen coordinates, ensuring consistent behavior during zoom and cropping operations. Additionally, comments have been refined for better understanding of the effective crop application, enhancing code readability and maintainability.
2025-09-17 01:54:04 +02:00
6c86271428 Refactor cropping logic in VideoEditor to utilize effective crop rectangle
This commit updates the cropping functionality in the VideoEditor class to use an effective crop rectangle derived from the current frame. It ensures that the crop is applied correctly within the bounds of the processed frame, enhancing the accuracy of cropping after rotation. Additionally, a visual outline of the effective crop is drawn on the canvas for debugging purposes, improving the user experience during video editing.
2025-09-17 01:51:56 +02:00
d0d2f66b11 Enhance effective crop rectangle calculation in VideoEditor for motion tracking
This commit updates the _get_effective_crop_rect_for_frame method to improve the calculation of the crop rectangle in rotated frame coordinates, incorporating tracking follow functionality. It ensures that the crop rectangle is accurately centered on the interpolated tracking position when motion tracking is enabled. Additionally, comments have been clarified to reflect the use of the effective crop, enhancing code readability and maintainability.
2025-09-17 01:48:49 +02:00