-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
413 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Ignore video files | ||
*.avi | ||
*.mp4 | ||
|
||
# Ignore any other unwanted files | ||
*.log | ||
*.tmp | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# SVO to AVI Export and Video Processing Script | ||
|
||
## Overview | ||
|
||
This script processes ZED SVO files, converting them to AVI format and rectifying the videos using calibration data. It handles the following tasks: | ||
|
||
- Converts SVO files to side-by-side stereo AVI videos. | ||
- Extracts and rectifies the left frames from the stereo videos based on provided calibration data. | ||
- Saves the processed videos to specified directories. | ||
|
||
## Usage | ||
|
||
### Configuration Parameters | ||
|
||
| Parameter Name | Type | Default | Description | | ||
|------------------|---------|---------------------------|-------------------------------------------------------| | ||
| `calib_file` | `str` | `../config/ZED_cal.conf` | Path to the ZED calibration file | | ||
| `svo_dir` | `str` | `../svos` | Directory containing the SVO files | | ||
| `stereo_dir` | `str` | `../stereo_raw` | Directory to save the raw stereo videos | | ||
| `left_dir` | `str` | `../left_raw` | Directory to save the extracted unrectified left frames | | ||
| `rectified_dir` | `str` | `../left_rectified` | Directory to save the rectified videos | | ||
| `save_left_raw` | `bool` | `False` | Boolean flag to save the unrectified left frames separately | | ||
|
||
### Running the Script | ||
|
||
1. Ensure your `config.yml` is set up correctly in the repository. | ||
2. Run the script: | ||
|
||
```bash | ||
python process_svo.py | ||
``` | ||
|
||
This will: | ||
|
||
- Convert SVO files to AVI format. | ||
- Extract and rectify left frames. | ||
- Save the processed videos to the specified directories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
[LEFT_CAM_2K] | ||
cx=1066.41 | ||
cy=625.178 | ||
fx=1415.39 | ||
fy=1414.51 | ||
k1=0.1816198718936867 | ||
k2=0.4879032297013213 | ||
k3=-0.438187135448847 | ||
p1=0.005421094419821622 | ||
p2=-0.01686702929877146 | ||
|
||
[LEFT_CAM_FHD] | ||
cx=922.414 | ||
cy=544.178 | ||
fx=1415.39 | ||
fy=1414.51 | ||
k1=0.1816198718936867 | ||
k2=0.4879032297013213 | ||
k3=-0.438187135448847 | ||
p1=0.005421094419821622 | ||
p2=-0.01686702929877146 | ||
|
||
[LEFT_CAM_HD] | ||
cx=619.707 | ||
cy=360.589 | ||
fx=707.696 | ||
fy=707.254 | ||
k1=0.1816198718936867 | ||
k2=0.4879032297013213 | ||
k3=-0.438187135448847 | ||
p1=0.005421094419821622 | ||
p2=-0.01686702929877146 | ||
|
||
[LEFT_CAM_VGA] | ||
cx=325.353 | ||
cy=187.794 | ||
fx=353.848 | ||
fy=353.627 | ||
k1=0.1816198718936867 | ||
k2=0.4879032297013213 | ||
k3=-0.438187135448847 | ||
p1=0.005421094419821622 | ||
p2=-0.01686702929877146 | ||
|
||
[LEFT_DISTO] | ||
k1=-3.9101563425884036 | ||
k2=6.391454716307374 | ||
k3=-0.3938564338149218 | ||
k4=-4.1267886263427185 | ||
k5=7.19124245711248 | ||
k6=-1.7322743753038055 | ||
p1=0.005276983500423566 | ||
p2=-0.0187359775947092 | ||
|
||
[MISC] | ||
Sensor_ID=0 | ||
|
||
[RIGHT_CAM_2K] | ||
cx=1130.23 | ||
cy=652.33 | ||
fx=1424.67 | ||
fy=1423.39 | ||
k1=0.14714494650863738 | ||
k2=0.6303797009809012 | ||
k3=-0.565602882131213 | ||
p1=0.004395821291027382 | ||
p2=0.0017445550028253628 | ||
|
||
[RIGHT_CAM_FHD] | ||
cx=986.228 | ||
cy=571.33 | ||
fx=1424.67 | ||
fy=1423.39 | ||
k1=0.14714494650863738 | ||
k2=0.6303797009809012 | ||
k3=-0.565602882131213 | ||
p1=0.004395821291027382 | ||
p2=0.0017445550028253628 | ||
|
||
[RIGHT_CAM_HD] | ||
cx=651.614 | ||
cy=374.165 | ||
fx=712.335 | ||
fy=711.693 | ||
k1=0.14714494650863738 | ||
k2=0.6303797009809012 | ||
k3=-0.565602882131213 | ||
p1=0.004395821291027382 | ||
p2=0.0017445550028253628 | ||
|
||
[RIGHT_CAM_VGA] | ||
cx=341.307 | ||
cy=194.583 | ||
fx=356.167 | ||
fy=355.847 | ||
k1=0.14714494650863738 | ||
k2=0.6303797009809012 | ||
k3=-0.565602882131213 | ||
p1=0.004395821291027382 | ||
p2=0.0017445550028253628 | ||
|
||
[RIGHT_DISTO] | ||
k1=-2.5686231485650217 | ||
k2=7.096133807450698 | ||
k3=2.240837535046636 | ||
k4=-2.7690481365031943 | ||
k5=7.5668447708406505 | ||
k6=0.1370213768080825 | ||
p1=0.005613285783167361 | ||
p2=0.0006467365383306965 | ||
|
||
[STEREO] | ||
Baseline=134.277 | ||
CV_2K=-0.00579565 | ||
CV_FHD=-0.00579565 | ||
CV_HD=-0.00579565 | ||
CV_VGA=-0.00579565 | ||
RX_2K=0.00235604 | ||
RX_FHD=0.00235604 | ||
RX_HD=0.00235604 | ||
RX_VGA=0.00235604 | ||
RZ_2K=0.00339379 | ||
RZ_FHD=0.00339379 | ||
RZ_HD=0.00339379 | ||
RZ_VGA=0.00339379 | ||
TY=-0.124973 | ||
TZ=1.98663 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Path to the ZED calibration file | ||
calib_file: "../config/ZED_cal.conf" | ||
|
||
# Directory containing the SVO files | ||
svo_dir: "../svos" | ||
|
||
# Directory to save the raw stereo videos converted from SVO | ||
stereo_dir: "../stereo_raw" | ||
|
||
# Directory to save the extracted unrectified left frames from stereo videos | ||
left_dir: "../left_raw" | ||
|
||
# Directory to save the rectified videos | ||
rectified_dir: "../left_rectified" | ||
|
||
# Boolean flag to determine whether to save the unrectified left frames separately | ||
save_left: False | ||
|
Oops, something went wrong.