arcjetCV 0.0.7.dev2__tar.gz → 0.0.7.dev3__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-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/PKG-INFO +1 -1
- arcjetcv-0.0.7.dev3/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
- arcjetcv-0.0.7.dev3/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/main.py +15 -4
- arcjetcv-0.0.7.dev3/arcjetCV/segmentation/contour/Unet-xception-last-checkpoint.pt +3 -0
- arcjetcv-0.0.7.dev3/arcjetCV/segmentation/contour/Unet-xception_25_original.pt +3 -0
- arcjetcv-0.0.7.dev3/arcjetCV/segmentation/time/time-checkpoint.pt +3 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/PKG-INFO +1 -1
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/SOURCES.txt +5 -10
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/setup.py +29 -14
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/calibrate_video.py +0 -55
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/calibration_controller.py +0 -891
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/calibration_main.py +0 -16
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/calibration_model.py +0 -178
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/calibration_view.py +0 -322
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/chessboard_pattern.png +0 -0
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/detetct_example.py +0 -48
- arcjetcv-0.0.7.dev2/arcjetCV/calibration/rotated_pattern.png +0 -0
- arcjetcv-0.0.7.dev2/arcjetCV/chessboard_pattern.png +0 -0
- arcjetcv-0.0.7.dev2/arcjetCV/utils/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/LICENSE +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/README.md +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2/arcjetCV/calibration → arcjetcv-0.0.7.dev3/arcjetCV/gui}/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/_arcjetCV_gui.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/arcjetCV_gui.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/custom_classes.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/gui/main_window.py +0 -0
- {arcjetcv-0.0.7.dev2/arcjetCV/gui → arcjetcv-0.0.7.dev3/arcjetCV/segmentation}/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2/arcjetCV/segmentation → arcjetcv-0.0.7.dev3/arcjetCV/segmentation/contour}/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/segmentation/contour/cnn.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/segmentation/contour/contour.py +0 -0
- {arcjetcv-0.0.7.dev2/arcjetCV/segmentation/contour → arcjetcv-0.0.7.dev3/arcjetCV/segmentation/time}/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/segmentation/time/time_segmentation.py +0 -0
- {arcjetcv-0.0.7.dev2/arcjetCV/segmentation/time → arcjetcv-0.0.7.dev3/arcjetCV/utils}/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/utils/logger.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/utils/output.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/utils/processor.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/utils/utils.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV/utils/video.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/dependency_links.txt +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/entry_points.txt +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/requires.txt +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/arcjetCV.egg-info/top_level.txt +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/setup.cfg +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/README.md +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/__init__.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_calibration_functions.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_calibration_gui.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_functions.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_gui.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_obj_models.py +0 -0
- {arcjetcv-0.0.7.dev2 → arcjetcv-0.0.7.dev3}/tests/test_segmentation.py +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -4,20 +4,31 @@ No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF AN
|
|
|
4
4
|
Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
import sys
|
|
8
|
+
import os
|
|
7
9
|
from PySide6.QtWidgets import QApplication
|
|
8
10
|
from PySide6.QtGui import QIcon
|
|
9
|
-
import sys
|
|
10
11
|
from arcjetCV.gui.main_window import MainWindow
|
|
11
12
|
|
|
13
|
+
# Function to get the correct icon path based on OS
|
|
14
|
+
def get_icon_path():
|
|
15
|
+
base_path = os.path.dirname(os.path.abspath(__file__)) # Get current script directory
|
|
16
|
+
icon_filename = "arcjetCV_logo_.ico" if sys.platform.startswith("win") else "arcjetCV_logo_.icns" if sys.platform == "darwin" else "arcjetCV_logo_.png"
|
|
17
|
+
return os.path.join(base_path, "logo", icon_filename)
|
|
12
18
|
|
|
13
19
|
def main():
|
|
14
20
|
app = QApplication(sys.argv)
|
|
15
21
|
window = MainWindow()
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
|
|
23
|
+
# Set application icon
|
|
24
|
+
icon_path = get_icon_path()
|
|
25
|
+
if os.path.exists(icon_path):
|
|
26
|
+
app.setWindowIcon(QIcon(icon_path))
|
|
27
|
+
else:
|
|
28
|
+
print(f"[WARNING] Icon file not found: {icon_path}")
|
|
29
|
+
|
|
18
30
|
window.show()
|
|
19
31
|
sys.exit(app.exec())
|
|
20
32
|
|
|
21
|
-
|
|
22
33
|
if __name__ == "__main__":
|
|
23
34
|
main()
|
|
@@ -2,35 +2,30 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
setup.py
|
|
4
4
|
arcjetCV/__init__.py
|
|
5
|
-
arcjetCV/chessboard_pattern.png
|
|
6
5
|
arcjetCV.egg-info/PKG-INFO
|
|
7
6
|
arcjetCV.egg-info/SOURCES.txt
|
|
8
7
|
arcjetCV.egg-info/dependency_links.txt
|
|
9
8
|
arcjetCV.egg-info/entry_points.txt
|
|
10
9
|
arcjetCV.egg-info/requires.txt
|
|
11
10
|
arcjetCV.egg-info/top_level.txt
|
|
12
|
-
arcjetCV/calibration/__init__.py
|
|
13
|
-
arcjetCV/calibration/calibrate_video.py
|
|
14
|
-
arcjetCV/calibration/calibration_controller.py
|
|
15
|
-
arcjetCV/calibration/calibration_main.py
|
|
16
|
-
arcjetCV/calibration/calibration_model.py
|
|
17
|
-
arcjetCV/calibration/calibration_view.py
|
|
18
|
-
arcjetCV/calibration/chessboard_pattern.png
|
|
19
|
-
arcjetCV/calibration/detetct_example.py
|
|
20
|
-
arcjetCV/calibration/rotated_pattern.png
|
|
21
11
|
arcjetCV/gui/__init__.py
|
|
22
12
|
arcjetCV/gui/_arcjetCV_gui.py
|
|
23
13
|
arcjetCV/gui/arcjetCV_gui.py
|
|
24
14
|
arcjetCV/gui/custom_classes.py
|
|
25
15
|
arcjetCV/gui/main.py
|
|
26
16
|
arcjetCV/gui/main_window.py
|
|
17
|
+
arcjetCV/gui/logo/arcjetCV_logo.icns
|
|
18
|
+
arcjetCV/gui/logo/arcjetCV_logo.ico
|
|
27
19
|
arcjetCV/gui/logo/arcjetCV_logo_.png
|
|
28
20
|
arcjetCV/gui/logo/arcjetCV_logo_white.png
|
|
29
21
|
arcjetCV/segmentation/__init__.py
|
|
22
|
+
arcjetCV/segmentation/contour/Unet-xception-last-checkpoint.pt
|
|
23
|
+
arcjetCV/segmentation/contour/Unet-xception_25_original.pt
|
|
30
24
|
arcjetCV/segmentation/contour/__init__.py
|
|
31
25
|
arcjetCV/segmentation/contour/cnn.py
|
|
32
26
|
arcjetCV/segmentation/contour/contour.py
|
|
33
27
|
arcjetCV/segmentation/time/__init__.py
|
|
28
|
+
arcjetCV/segmentation/time/time-checkpoint.pt
|
|
34
29
|
arcjetCV/segmentation/time/time_segmentation.py
|
|
35
30
|
arcjetCV/utils/__init__.py
|
|
36
31
|
arcjetCV/utils/logger.py
|
|
@@ -7,21 +7,36 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
7
7
|
long_description = fh.read()
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
# Define a function to check for platform-specific dependencies
|
|
11
10
|
def check_linux_dependencies():
|
|
12
11
|
if sys.platform.startswith("linux"):
|
|
13
|
-
print(
|
|
14
|
-
"\n[INFO] Linux detected: Ensure the following system libraries are installed:"
|
|
15
|
-
)
|
|
16
|
-
print(
|
|
17
|
-
"\n[INFO] Run the following command to install the necessary Qt dependencies:"
|
|
18
|
-
)
|
|
19
|
-
print(
|
|
20
|
-
"\n[Ubuntu/Debian] sudo apt-get install libxcb-xinerama0 libxcb1 libx11-xcb1 libxcb-cursor0"
|
|
21
|
-
)
|
|
22
|
-
print("[Fedora] sudo dnf install libxcb libX11-xcb libxcb-cursor")
|
|
23
|
-
print("[Arch] sudo pacman -S libxcb xcb-util xcb-util-cursor\n")
|
|
12
|
+
print("\n[INFO] Linux detected: Checking required system libraries...")
|
|
24
13
|
|
|
14
|
+
# List of required packages
|
|
15
|
+
required_packages = [
|
|
16
|
+
"libxcb-xinerama0", "libxcb1", "libx11-xcb1", "libxcb-cursor0",
|
|
17
|
+
"libxcb-icccm4", "libxcb-keysyms1", "libxcb-render-util0",
|
|
18
|
+
"libxcb-shape0", "libxcb-xfixes0", "libxcb-randr0",
|
|
19
|
+
"libxcb-util1", "libxcb-image0", "libxcb-sync1", "libxcb-xinput0"
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
# Check if running on Ubuntu/Debian
|
|
24
|
+
with open("/etc/os-release") as f:
|
|
25
|
+
os_info = f.read().lower()
|
|
26
|
+
if "ubuntu" in os_info or "debian" in os_info:
|
|
27
|
+
print("\n[INFO] Ubuntu/Debian detected. Installing dependencies via APT...")
|
|
28
|
+
subprocess.run(["sudo", "apt", "update"], check=True)
|
|
29
|
+
subprocess.run(["sudo", "apt", "install", "-y"] + required_packages, check=True)
|
|
30
|
+
print("\n[INFO] System dependencies installed successfully.")
|
|
31
|
+
else:
|
|
32
|
+
print("\n[WARNING] Non-Debian system detected. Please install the dependencies manually.")
|
|
33
|
+
print("\n[INFO] Run one of the following commands based on your distribution:")
|
|
34
|
+
print("\n[Ubuntu/Debian] sudo apt-get install " + " ".join(required_packages))
|
|
35
|
+
print("[Fedora] sudo dnf install libxcb libX11-xcb libxcb-cursor")
|
|
36
|
+
print("[Arch] sudo pacman -S libxcb xcb-util xcb-util-cursor\n")
|
|
37
|
+
|
|
38
|
+
except Exception as e:
|
|
39
|
+
print(f"\n[ERROR] Could not determine Linux distribution: {e}")
|
|
25
40
|
|
|
26
41
|
# Run the platform check before proceeding
|
|
27
42
|
check_linux_dependencies()
|
|
@@ -29,7 +44,7 @@ check_linux_dependencies()
|
|
|
29
44
|
# Define the setup configuration
|
|
30
45
|
setup(
|
|
31
46
|
name="arcjetCV",
|
|
32
|
-
version="0.0.7.
|
|
47
|
+
version="0.0.7.dev3", # Set the version directly here
|
|
33
48
|
author="arcjetCV team",
|
|
34
49
|
description="Package to process arcjet videos and segment the edge of the shock and of the sample",
|
|
35
50
|
long_description=long_description,
|
|
@@ -39,7 +54,7 @@ setup(
|
|
|
39
54
|
include_package_data=True, # Include package data based on the rules below
|
|
40
55
|
package_data={
|
|
41
56
|
"": ["*.txt", "*.md", "*.png", "*.gif"], # Include these file types
|
|
42
|
-
"arcjetCV": ["gui/logo/*.png"], # Include specific logo images
|
|
57
|
+
"arcjetCV": ["gui/logo/*.png", "gui/logo/*.ico", "gui/logo/*.icns"], # Include specific logo images
|
|
43
58
|
},
|
|
44
59
|
exclude_package_data={
|
|
45
60
|
"arcjetCV": [
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
def apply_calibration(frame, calibration_data):
|
|
2
|
-
"""
|
|
3
|
-
Apply calibration to a single frame using provided calibration data.
|
|
4
|
-
|
|
5
|
-
Args:
|
|
6
|
-
frame (numpy.ndarray): The input frame (image) to calibrate.
|
|
7
|
-
calibration_data (dict): A dictionary containing calibration data with keys:
|
|
8
|
-
- "camera_matrix": The intrinsic camera matrix.
|
|
9
|
-
- "dist_coeffs": The distortion coefficients.
|
|
10
|
-
- "rvec" (optional): The rotation vector for 3D transformations.
|
|
11
|
-
- "tvec" (optional): The translation vector for 3D transformations.
|
|
12
|
-
|
|
13
|
-
Returns:
|
|
14
|
-
numpy.ndarray: The calibrated frame (image).
|
|
15
|
-
"""
|
|
16
|
-
# Extract calibration data
|
|
17
|
-
camera_matrix = np.array(calibration_data["camera_matrix"])
|
|
18
|
-
dist_coeffs = np.array(calibration_data["dist_coeffs"])
|
|
19
|
-
|
|
20
|
-
# Undistort the frame
|
|
21
|
-
h, w = frame.shape[:2]
|
|
22
|
-
new_camera_matrix, _ = cv2.getOptimalNewCameraMatrix(
|
|
23
|
-
camera_matrix, dist_coeffs, (w, h), 1, (w, h)
|
|
24
|
-
)
|
|
25
|
-
undistorted_frame = cv2.undistort(frame, camera_matrix, dist_coeffs, None, new_camera_matrix)
|
|
26
|
-
|
|
27
|
-
# Apply 3D transformations if rvec and tvec are available
|
|
28
|
-
if "rvec" in calibration_data and "tvec" in calibration_data:
|
|
29
|
-
rvec = np.array(calibration_data["rvec"])
|
|
30
|
-
tvec = np.array(calibration_data["tvec"])
|
|
31
|
-
|
|
32
|
-
# Define points on the image plane
|
|
33
|
-
height, width = undistorted_frame.shape[:2]
|
|
34
|
-
object_points = np.array([
|
|
35
|
-
[0, 0, 0],
|
|
36
|
-
[width, 0, 0],
|
|
37
|
-
[width, height, 0],
|
|
38
|
-
[0, height, 0]
|
|
39
|
-
], dtype=np.float32)
|
|
40
|
-
|
|
41
|
-
# Project 3D points to the image plane
|
|
42
|
-
image_points, _ = cv2.projectPoints(object_points, rvec, tvec, new_camera_matrix, None)
|
|
43
|
-
|
|
44
|
-
# Compute the perspective transform
|
|
45
|
-
src_points = np.float32([[0, 0], [width, 0], [width, height], [0, height]])
|
|
46
|
-
dst_points = np.float32(image_points[:, 0, :])
|
|
47
|
-
perspective_transform = cv2.getPerspectiveTransform(src_points, dst_points)
|
|
48
|
-
|
|
49
|
-
# Apply the perspective transformation
|
|
50
|
-
calibrated_frame = cv2.warpPerspective(undistorted_frame, perspective_transform, (w, h))
|
|
51
|
-
else:
|
|
52
|
-
# If no 3D transformation data, return the undistorted frame
|
|
53
|
-
calibrated_frame = undistorted_frame
|
|
54
|
-
|
|
55
|
-
return calibrated_frame
|