arcjetCV 1.1.5.dev1__tar.gz → 1.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arcjetcv-1.1.5.dev1/arcjetcv.egg-info → arcjetcv-1.1.7}/PKG-INFO +1 -1
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/README.md +24 -6
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/__init__.py +1 -1
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/calibration/calibration_controller.py +96 -101
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/_arcjetCV_gui.py +1 -1
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/arcjetCV_gui.py +17 -3
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/main.py +23 -19
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/main_window.py +690 -149
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/contour/model_loader.py +37 -5
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/time/time_segmentation.py +60 -15
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/processor.py +60 -22
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/video.py +59 -19
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7/arcjetcv.egg-info}/PKG-INFO +1 -1
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetcv.egg-info/SOURCES.txt +0 -10
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/setup.py +11 -4
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_gui.py +1 -1
- arcjetcv-1.1.5.dev1/MANIFEST.in +0 -1
- arcjetcv-1.1.5.dev1/README_pypi.md +0 -141
- arcjetcv-1.1.5.dev1/arcjetCV/calibration/calibrate_video.py +0 -55
- arcjetcv-1.1.5.dev1/arcjetCV/calibration/chessboard_pattern.png +0 -0
- arcjetcv-1.1.5.dev1/arcjetCV/calibration/detetct_example.py +0 -48
- arcjetcv-1.1.5.dev1/arcjetCV/calibration/rotated_pattern.png +0 -0
- arcjetcv-1.1.5.dev1/arcjetCV/calibration/test.py +0 -70
- arcjetcv-1.1.5.dev1/arcjetCV/chessboard_pattern.png +0 -0
- arcjetcv-1.1.5.dev1/arcjetCV/segmentation/contour/conversion.py +0 -27
- arcjetcv-1.1.5.dev1/tests/chessboard_pattern.png +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/LICENSE +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/calibration/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/calibration/calibration_main.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/calibration/calibration_model.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/calibration/calibration_view.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/custom_classes.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/contour/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/contour/cnn.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/contour/contour.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/segmentation/time/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/logger.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/output.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetCV/utils/utils.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetcv.egg-info/dependency_links.txt +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetcv.egg-info/entry_points.txt +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetcv.egg-info/requires.txt +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/arcjetcv.egg-info/top_level.txt +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/setup.cfg +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/README.md +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/__init__.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_calibration_functions.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_calibration_gui.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_functions.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_obj_models.py +0 -0
- {arcjetcv-1.1.5.dev1 → arcjetcv-1.1.7}/tests/test_segmentation.py +0 -0
|
@@ -111,6 +111,24 @@ conda activate arcjetCV
|
|
|
111
111
|
python test.py
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
+
## Documentation (django-wiki)
|
|
115
|
+
|
|
116
|
+
The living documentation now runs on django-wiki inside `wiki_site/` (preferred path for edits). To start it locally:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
cd wiki_site
|
|
120
|
+
python -m venv .venv
|
|
121
|
+
source .venv/bin/activate
|
|
122
|
+
pip install -r requirements.txt
|
|
123
|
+
python manage.py migrate
|
|
124
|
+
python manage.py createsuperuser
|
|
125
|
+
python manage.py runserver
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Open http://127.0.0.1:8000/ to add and edit pages (log in with the superuser you created). Admin is at `/admin/` and auth views are under `/accounts/`.
|
|
129
|
+
|
|
130
|
+
Legacy Sphinx and MkDocs builds remain in `docs/` and `mkdocs/` if you still need static HTML/PDF exports.
|
|
131
|
+
|
|
114
132
|
## Citing
|
|
115
133
|
|
|
116
134
|
If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://doi.org/10.2514/1.A36132):
|
|
@@ -120,14 +138,14 @@ If you use arcjetCV in your research, please use the following BibTeX entry to c
|
|
|
120
138
|
author = {Quintart, Alexandre M. and Haw, Magnus A. and Semeraro, Federico},
|
|
121
139
|
title = {arcjetCV: Open-Source Software to Analyze Material Ablation},
|
|
122
140
|
journal = {Journal of Spacecraft and Rockets},
|
|
123
|
-
volume = {
|
|
124
|
-
number = {
|
|
125
|
-
pages = {
|
|
126
|
-
year = {
|
|
141
|
+
volume = {62},
|
|
142
|
+
number = {5},
|
|
143
|
+
pages = {1644-1653},
|
|
144
|
+
year = {2025},
|
|
127
145
|
doi = {10.2514/1.A36132},
|
|
128
146
|
URL = {https://doi.org/10.2514/1.A36132},
|
|
129
|
-
eprint = {https://doi.org/10.2514/1.A36132}
|
|
130
|
-
}
|
|
147
|
+
eprint = {https://doi.org/10.2514/1.A36132},
|
|
148
|
+
abstract = { ArcjetCV is an open-source Python software designed to automate time-resolved measurements of heat shield material ablation and recession rates from arcjet test video footage. This new automated and accessible capability enables two-dimensional in situ recession characterization from profile video. ArcjetCV automates the video segmentation process using two primary machine-learning models: a one-dimensional (1D) Convolutional Neural Network (CNN) to infer the time window of interest and a two-dimensional CNN for image segmentation. A graphical user interface simplifies the user experience and an application programming interface allows users to call the core functions from scripts, enabling batch video processing. ArcjetCV’s capability to measure time-resolved recession the enables characterization of nonlinear processes (nonlinear recession, shrinkage, swelling, etc.), contributing to higher-fidelity validation and improved modeling of heat shield material performance. The source code associated with this paper can be found at https://github.com/magnus-haw/arcjetCV. }}
|
|
131
149
|
```
|
|
132
150
|
|
|
133
151
|
## Legal / License
|
|
@@ -14,7 +14,7 @@ Root directory for the arcjetCV package.
|
|
|
14
14
|
# - git push origin main
|
|
15
15
|
# - git tag -a v$(python setup.py --version) -m 'INPUT DESCRIPTION'
|
|
16
16
|
# - gh release create v$(python setup.py --version) --target main
|
|
17
|
-
__version__ = "
|
|
17
|
+
__version__ = "1.1.7"
|
|
18
18
|
|
|
19
19
|
from arcjetCV.utils.video import Video, VideoMeta
|
|
20
20
|
from arcjetCV.utils.processor import ArcjetProcessor
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
from arcjetCV.calibration.calibration_model import CalibrationModel
|
|
2
2
|
from arcjetCV.calibration.calibration_view import CalibrationView
|
|
3
3
|
from PySide6.QtWidgets import QFileDialog, QMessageBox
|
|
4
|
-
from PySide6.
|
|
4
|
+
from PySide6.QtGui import QDesktopServices
|
|
5
|
+
from PySide6.QtCore import QUrl
|
|
5
6
|
from matplotlib.backend_bases import cursors
|
|
6
7
|
import numpy as np
|
|
7
8
|
import cv2
|
|
8
9
|
import json
|
|
9
10
|
import os
|
|
10
11
|
from pathlib import Path
|
|
11
|
-
import shutil
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class CalibrationController:
|
|
@@ -365,7 +365,7 @@ class CalibrationController:
|
|
|
365
365
|
|
|
366
366
|
def calibrate_camera(self, img_path):
|
|
367
367
|
"""
|
|
368
|
-
Perform full 3D camera calibration and
|
|
368
|
+
Perform full 3D camera calibration and keep results in memory.
|
|
369
369
|
|
|
370
370
|
This method:
|
|
371
371
|
- Detects a calibration pattern in the given image.
|
|
@@ -376,15 +376,13 @@ class CalibrationController:
|
|
|
376
376
|
:param img_path: Path to the grayscale image containing the calibration pattern.
|
|
377
377
|
:type img_path: str
|
|
378
378
|
|
|
379
|
-
:return:
|
|
380
|
-
:rtype: None
|
|
379
|
+
:return: True on success, else None.
|
|
380
|
+
:rtype: bool | None
|
|
381
381
|
"""
|
|
382
382
|
pattern_size = (
|
|
383
383
|
self.view.grid_cols_input.value(),
|
|
384
384
|
self.view.grid_rows_input.value(),
|
|
385
385
|
)
|
|
386
|
-
spacing = 1.0
|
|
387
|
-
|
|
388
386
|
obj_points = []
|
|
389
387
|
img_points = []
|
|
390
388
|
|
|
@@ -399,7 +397,9 @@ class CalibrationController:
|
|
|
399
397
|
img_points.append(img_p)
|
|
400
398
|
else:
|
|
401
399
|
QMessageBox.warning(
|
|
402
|
-
self.view,
|
|
400
|
+
self.view,
|
|
401
|
+
"Error",
|
|
402
|
+
f'No pattern detected in "{Path(img_path).name}", check the pattern size.',
|
|
403
403
|
)
|
|
404
404
|
return
|
|
405
405
|
|
|
@@ -455,99 +455,68 @@ class CalibrationController:
|
|
|
455
455
|
"homography_inverse": H_inv.tolist(),
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
)
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
"homography": np.array(
|
|
489
|
-
calibration_data["homography"], dtype=np.float32
|
|
490
|
-
),
|
|
491
|
-
"homography_inverse": np.array(
|
|
492
|
-
calibration_data["homography_inverse"], dtype=np.float32
|
|
493
|
-
),
|
|
494
|
-
}
|
|
495
|
-
self.calibrated = True
|
|
496
|
-
QMessageBox.information(
|
|
497
|
-
self.view,
|
|
498
|
-
"Success",
|
|
499
|
-
"3D and 2D Camera calibration successful and saved.",
|
|
500
|
-
)
|
|
501
|
-
else:
|
|
502
|
-
self.calibration_data = None
|
|
503
|
-
self.calibrated = False
|
|
504
|
-
QMessageBox.warning(
|
|
505
|
-
self.view, "Error", f"Failed to save calibration: {save_error}"
|
|
506
|
-
)
|
|
458
|
+
# Keep calibration in memory. Persist only when user clicks "Save Calibration".
|
|
459
|
+
self.calibration_data = {
|
|
460
|
+
"camera_matrix": np.array(calibration_data["camera_matrix"], dtype=np.float32),
|
|
461
|
+
"dist_coeffs": np.array(calibration_data["dist_coeffs"], dtype=np.float32),
|
|
462
|
+
"rvec": (
|
|
463
|
+
np.array(calibration_data["rvec"], dtype=np.float32)
|
|
464
|
+
if calibration_data["rvec"]
|
|
465
|
+
else None
|
|
466
|
+
),
|
|
467
|
+
"tvec": (
|
|
468
|
+
np.array(calibration_data["tvec"], dtype=np.float32)
|
|
469
|
+
if calibration_data["tvec"]
|
|
470
|
+
else None
|
|
471
|
+
),
|
|
472
|
+
"affine_matrix": (
|
|
473
|
+
np.array(calibration_data["affine_matrix"], dtype=np.float32)
|
|
474
|
+
if calibration_data["affine_matrix"]
|
|
475
|
+
else None
|
|
476
|
+
),
|
|
477
|
+
"pixels_per_mm": calibration_data.get("pixels_per_mm", None),
|
|
478
|
+
"pattern_size": tuple(calibration_data["pattern_size"]),
|
|
479
|
+
"centers": np.array(calibration_data["centers"], dtype=np.float32),
|
|
480
|
+
"square_layout": np.array(calibration_data["square_layout"], dtype=np.float32),
|
|
481
|
+
"homography": np.array(calibration_data["homography"], dtype=np.float32),
|
|
482
|
+
"homography_inverse": np.array(
|
|
483
|
+
calibration_data["homography_inverse"], dtype=np.float32
|
|
484
|
+
),
|
|
485
|
+
}
|
|
486
|
+
self.calibrated = True
|
|
487
|
+
return True
|
|
507
488
|
|
|
508
489
|
def print_chessboard(self):
|
|
509
490
|
"""
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
Creates a standard black-and-white chessboard PNG image and attempts to print it.
|
|
513
|
-
The generated file is saved as 'chessboard_pattern.png' and printed via QPrinter.
|
|
491
|
+
Open the packaged calibration PDF for printing.
|
|
514
492
|
|
|
515
493
|
:return: None
|
|
516
494
|
:rtype: None
|
|
517
495
|
"""
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
if print_dialog.exec() == QFileDialog.Accepted:
|
|
537
|
-
image = QImage(filename)
|
|
538
|
-
painter = QPainter(printer)
|
|
539
|
-
rect = painter.viewport()
|
|
540
|
-
size = image.size()
|
|
541
|
-
size.scale(rect.size(), Qt.KeepAspectRatio)
|
|
542
|
-
painter.setViewport(rect.x(), rect.y(), size.width(), size.height())
|
|
543
|
-
painter.setWindow(image.rect())
|
|
544
|
-
painter.drawImage(0, 0, image)
|
|
545
|
-
painter.end()
|
|
546
|
-
QMessageBox.information(
|
|
547
|
-
self.view, "Success", f"{filename} printed successfully."
|
|
548
|
-
)
|
|
496
|
+
pdf_path = Path(__file__).resolve().parent / "calibration.pdf"
|
|
497
|
+
show_arcjet_box = hasattr(self.view, "arcjetcv_message_box")
|
|
498
|
+
|
|
499
|
+
if not pdf_path.exists():
|
|
500
|
+
msg = f"Calibration PDF not found:\n{pdf_path}"
|
|
501
|
+
if show_arcjet_box:
|
|
502
|
+
self.view.arcjetcv_message_box("Error", msg)
|
|
503
|
+
else:
|
|
504
|
+
QMessageBox.warning(self.view, "Error", msg)
|
|
505
|
+
return
|
|
506
|
+
|
|
507
|
+
opened = QDesktopServices.openUrl(QUrl.fromLocalFile(str(pdf_path)))
|
|
508
|
+
if opened:
|
|
509
|
+
msg = "Opened calibration PDF.\nUse your PDF viewer print action."
|
|
510
|
+
if show_arcjet_box:
|
|
511
|
+
self.view.arcjetcv_message_box("Print Calibration Pattern", msg)
|
|
512
|
+
else:
|
|
513
|
+
QMessageBox.information(self.view, "Print Calibration Pattern", msg)
|
|
549
514
|
else:
|
|
550
|
-
|
|
515
|
+
msg = f"Could not open calibration PDF:\n{pdf_path}"
|
|
516
|
+
if show_arcjet_box:
|
|
517
|
+
self.view.arcjetcv_message_box("Error", msg)
|
|
518
|
+
else:
|
|
519
|
+
QMessageBox.warning(self.view, "Error", msg)
|
|
551
520
|
|
|
552
521
|
def load_image(self):
|
|
553
522
|
"""Load an image for resolution measurement."""
|
|
@@ -671,7 +640,8 @@ class CalibrationController:
|
|
|
671
640
|
return
|
|
672
641
|
|
|
673
642
|
self.image = cv2.imread(file_path)
|
|
674
|
-
self.calibrate_camera(file_path)
|
|
643
|
+
if not self.calibrate_camera(file_path) or self.calibration_data is None:
|
|
644
|
+
return
|
|
675
645
|
self.image = self.apply_calibration(self.image, self.calibration_data)
|
|
676
646
|
|
|
677
647
|
if self.image is None:
|
|
@@ -825,20 +795,45 @@ class CalibrationController:
|
|
|
825
795
|
|
|
826
796
|
:raises QMessageBox.critical: If copying or saving fails.
|
|
827
797
|
"""
|
|
828
|
-
|
|
798
|
+
if not self.calibration_data:
|
|
799
|
+
QMessageBox.warning(self.view, "Error", "No calibration data available to save.")
|
|
800
|
+
return
|
|
829
801
|
|
|
830
802
|
file_path, _ = QFileDialog.getSaveFileName(
|
|
831
803
|
None, "Save Calibration", "", "JSON Files (*.json);;All Files (*)"
|
|
832
804
|
)
|
|
833
805
|
|
|
834
806
|
if file_path:
|
|
835
|
-
source_file = os.path.join(
|
|
836
|
-
Path(__file__).parent.absolute(), "calibration_results.json"
|
|
837
|
-
)
|
|
838
807
|
try:
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
808
|
+
serializable = {
|
|
809
|
+
"camera_matrix": self.calibration_data["camera_matrix"].tolist(),
|
|
810
|
+
"dist_coeffs": self.calibration_data["dist_coeffs"].tolist(),
|
|
811
|
+
"rvec": (
|
|
812
|
+
self.calibration_data["rvec"].tolist()
|
|
813
|
+
if self.calibration_data["rvec"] is not None
|
|
814
|
+
else None
|
|
815
|
+
),
|
|
816
|
+
"tvec": (
|
|
817
|
+
self.calibration_data["tvec"].tolist()
|
|
818
|
+
if self.calibration_data["tvec"] is not None
|
|
819
|
+
else None
|
|
820
|
+
),
|
|
821
|
+
"affine_matrix": (
|
|
822
|
+
self.calibration_data["affine_matrix"].tolist()
|
|
823
|
+
if self.calibration_data["affine_matrix"] is not None
|
|
824
|
+
else None
|
|
825
|
+
),
|
|
826
|
+
"pixels_per_mm": self.calibration_data.get("pixels_per_mm", None),
|
|
827
|
+
"pattern_size": list(self.calibration_data["pattern_size"]),
|
|
828
|
+
"centers": self.calibration_data["centers"].tolist(),
|
|
829
|
+
"square_layout": self.calibration_data["square_layout"].tolist(),
|
|
830
|
+
"homography": self.calibration_data["homography"].tolist(),
|
|
831
|
+
"homography_inverse": self.calibration_data[
|
|
832
|
+
"homography_inverse"
|
|
833
|
+
].tolist(),
|
|
834
|
+
}
|
|
835
|
+
with open(file_path, "w") as f:
|
|
836
|
+
json.dump(serializable, f, indent=4)
|
|
842
837
|
QMessageBox.information(
|
|
843
838
|
self.view, "Success", f"Calibration saved as {file_path}"
|
|
844
839
|
)
|
|
@@ -790,7 +790,7 @@ class Ui_MainWindow(object):
|
|
|
790
790
|
self.label_17.setText(_translate("MainWindow", "Frame range:"))
|
|
791
791
|
self.label_20.setText(_translate("MainWindow", "Output filename:"))
|
|
792
792
|
self.label_10.setText(_translate("MainWindow", "Process every Nth:"))
|
|
793
|
-
self.checkBox_writeVideo.setText(_translate("MainWindow", "Write video
|
|
793
|
+
self.checkBox_writeVideo.setText(_translate("MainWindow", "Write video"))
|
|
794
794
|
self.pushButton_process.setText(_translate("MainWindow", "Process All"))
|
|
795
795
|
self.tabWidget.setTabText(
|
|
796
796
|
self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Extract Edges")
|
|
@@ -777,6 +777,16 @@ class Ui_MainWindow(object):
|
|
|
777
777
|
|
|
778
778
|
self.gridLayout_2.addWidget(self.checkBox_display_shock2, 4, 1, 1, 1)
|
|
779
779
|
|
|
780
|
+
self.label_kalman_filter = QLabel(self.tab_5)
|
|
781
|
+
self.label_kalman_filter.setObjectName("label_kalman_filter")
|
|
782
|
+
|
|
783
|
+
self.gridLayout_2.addWidget(self.label_kalman_filter, 5, 0, 1, 1)
|
|
784
|
+
|
|
785
|
+
self.checkBox_kalman_filter = QCheckBox(self.tab_5)
|
|
786
|
+
self.checkBox_kalman_filter.setObjectName("checkBox_kalman_filter")
|
|
787
|
+
|
|
788
|
+
self.gridLayout_2.addWidget(self.checkBox_kalman_filter, 5, 1, 1, 1)
|
|
789
|
+
|
|
780
790
|
self.tabWidget_2.addTab(self.tab_5, "")
|
|
781
791
|
self.tab_6 = QWidget()
|
|
782
792
|
self.tab_6.setObjectName("tab_6")
|
|
@@ -956,7 +966,7 @@ class Ui_MainWindow(object):
|
|
|
956
966
|
|
|
957
967
|
def retranslateUi(self, MainWindow):
|
|
958
968
|
MainWindow.setWindowTitle(
|
|
959
|
-
QCoreApplication.translate("MainWindow", "
|
|
969
|
+
QCoreApplication.translate("MainWindow", "arcjetCV", None)
|
|
960
970
|
)
|
|
961
971
|
self.actionLoad_video.setText(
|
|
962
972
|
QCoreApplication.translate("MainWindow", "Load video", None)
|
|
@@ -991,7 +1001,7 @@ class Ui_MainWindow(object):
|
|
|
991
1001
|
QCoreApplication.translate("MainWindow", "Filter Method:", None)
|
|
992
1002
|
)
|
|
993
1003
|
self.label_display_shock.setText(
|
|
994
|
-
QCoreApplication.translate("MainWindow", "
|
|
1004
|
+
QCoreApplication.translate("MainWindow", "Detect Shock", None)
|
|
995
1005
|
)
|
|
996
1006
|
self.comboBox_flowDirection.setItemText(
|
|
997
1007
|
0, QCoreApplication.translate("MainWindow", "right", None)
|
|
@@ -1081,7 +1091,7 @@ class Ui_MainWindow(object):
|
|
|
1081
1091
|
QCoreApplication.translate("MainWindow", "Output filename:", None)
|
|
1082
1092
|
)
|
|
1083
1093
|
self.checkBox_writeVideo.setText(
|
|
1084
|
-
QCoreApplication.translate("MainWindow", "Write video
|
|
1094
|
+
QCoreApplication.translate("MainWindow", "Write video", None)
|
|
1085
1095
|
)
|
|
1086
1096
|
self.pushButton_process.setText(
|
|
1087
1097
|
QCoreApplication.translate("MainWindow", "Process All", None)
|
|
@@ -1126,6 +1136,10 @@ class Ui_MainWindow(object):
|
|
|
1126
1136
|
QCoreApplication.translate("MainWindow", "Display Shock", None)
|
|
1127
1137
|
)
|
|
1128
1138
|
self.checkBox_display_shock2.setText("")
|
|
1139
|
+
self.label_kalman_filter.setText(
|
|
1140
|
+
QCoreApplication.translate("MainWindow", "Kalman filter", None)
|
|
1141
|
+
)
|
|
1142
|
+
self.checkBox_kalman_filter.setText("")
|
|
1129
1143
|
self.tabWidget_2.setTabText(
|
|
1130
1144
|
self.tabWidget_2.indexOf(self.tab_5),
|
|
1131
1145
|
QCoreApplication.translate("MainWindow", "Plotting params", None),
|
|
@@ -10,37 +10,41 @@ from PySide6.QtWidgets import QApplication
|
|
|
10
10
|
from PySide6.QtGui import QIcon
|
|
11
11
|
from arcjetCV.gui.main_window import MainWindow
|
|
12
12
|
from arcjetCV.segmentation.contour.model_loader import get_model_checkpoint
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from PySide6.QtCore import QCoreApplication
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
# Function to get the correct icon path based on OS
|
|
16
17
|
def get_icon_path():
|
|
17
|
-
base_path =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"arcjetCV_logo.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return os.path.join(base_path, "logo", icon_filename)
|
|
18
|
+
base_path = Path(__file__).resolve().parent
|
|
19
|
+
if sys.platform.startswith("win"):
|
|
20
|
+
icon_filename = "arcjetCV_logo_.png"
|
|
21
|
+
elif sys.platform == "darwin":
|
|
22
|
+
icon_filename = "arcjetCV_logo.icns"
|
|
23
|
+
else:
|
|
24
|
+
icon_filename = "arcjetCV_logo_.png"
|
|
25
|
+
return base_path / "logo" / icon_filename
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def main():
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
QCoreApplication.setApplicationName("arcjetCV")
|
|
30
|
+
QCoreApplication.setOrganizationName("NASA") # optional, use your name/org
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
app = QApplication(sys.argv)
|
|
33
33
|
icon_path = get_icon_path()
|
|
34
|
-
try:
|
|
35
|
-
get_model_checkpoint()
|
|
36
|
-
except Exception as e:
|
|
37
|
-
print(f"[WARNING] Could not preload model weights: {e}")
|
|
38
34
|
|
|
39
|
-
if
|
|
40
|
-
|
|
35
|
+
if icon_path.exists():
|
|
36
|
+
icon = QIcon(str(icon_path))
|
|
37
|
+
app.setWindowIcon(icon) # sets default for future windows
|
|
41
38
|
else:
|
|
42
39
|
print(f"[WARNING] Icon file not found: {icon_path}")
|
|
43
40
|
|
|
41
|
+
window = MainWindow()
|
|
42
|
+
if icon_path.exists():
|
|
43
|
+
window.setWindowIcon(QIcon(str(icon_path))) # <- explicit for taskbar
|
|
44
|
+
try:
|
|
45
|
+
get_model_checkpoint()
|
|
46
|
+
except Exception as e:
|
|
47
|
+
print(f"[WARNING] Could not preload model weights: {e}")
|
|
44
48
|
window.show()
|
|
45
49
|
sys.exit(app.exec())
|
|
46
50
|
|