arcjetCV 0.0.7.dev2__py3-none-any.whl → 0.0.7.dev4__py3-none-any.whl

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.
Binary file
Binary file
arcjetCV/gui/main.py CHANGED
@@ -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
- path = "logo/arcjetCV_logo_.png"
17
- app.setWindowIcon(QIcon(path))
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()
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2854ff0694187ce0eb3d852277f65be8da17acee5f02f826c797478336dd990b
3
+ size 115472778
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c8e1ee2f28e1b51d6d7060b6dec39e7afc9a917fe5c1c57fe1e7e86f30b151c
3
+ size 115473862
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67a8f307ebfe8679f2049ea86e0fb4222efad1499acad5485c00d3deb36c7cff
3
+ size 42054
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: arcjetCV
3
- Version: 0.0.7.dev2
3
+ Version: 0.0.7.dev4
4
4
  Summary: Package to process arcjet videos and segment the edge of the shock and of the sample
5
5
  Home-page: https://github.com/magnus-haw/arcjetCV
6
6
  Author: arcjetCV team
@@ -1,27 +1,27 @@
1
1
  arcjetCV/__init__.py,sha256=kP9aGiOz-RNfwr1BRz1OW-96ztitlHuBGj-NWxBbTRA,2308
2
- arcjetCV/chessboard_pattern.png,sha256=P68ymEW07kVgknRrj3a-P11fSXoBT3MdOq0CVbun6uc,3672
3
2
  arcjetCV/calibration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- arcjetCV/calibration/calibrate_video.py,sha256=v9jN2TV9Zf71LDPaZ4ml01iCgdbYlqcScnzwTXFyM2U,2276
5
3
  arcjetCV/calibration/calibration_controller.py,sha256=DXNuMuuurI9buUXa15HpeA_wZrLiWM_guGl7pzkBevw,33680
6
4
  arcjetCV/calibration/calibration_main.py,sha256=Wt2v7UWSyR6chWgYQzGwuniDZv4LXVp_nxc1HahG_Io,358
7
5
  arcjetCV/calibration/calibration_model.py,sha256=GNcr40Ras-GJu4HH14t8WB4OJA9ZRXKXyuRbfv41gyE,6545
8
6
  arcjetCV/calibration/calibration_view.py,sha256=utlytDtEyH8wiuSD0UQ2FahoGg-OFHYhYJwEWFSk9l8,13010
9
- arcjetCV/calibration/chessboard_pattern.png,sha256=P68ymEW07kVgknRrj3a-P11fSXoBT3MdOq0CVbun6uc,3672
10
- arcjetCV/calibration/detetct_example.py,sha256=EonWBqziQNyoL6jG5MRgJAuf4EQdjDeVarzl5nfOZfo,1467
11
- arcjetCV/calibration/rotated_pattern.png,sha256=XFLP4vHhOtH5Og1Ydxxl3kU9Rtfhlbgu7wabe7mrC24,7356
12
7
  arcjetCV/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
8
  arcjetCV/gui/_arcjetCV_gui.py,sha256=tcPPE_-O_3KpgmaNU7lFxvLz4rshdML1gWSHbt-sL40,46354
14
9
  arcjetCV/gui/arcjetCV_gui.py,sha256=XtsuZU8-e221XeRLMuVP1Ef_kQJxqAKrwxsWQWr0Bsw,47497
15
10
  arcjetCV/gui/custom_classes.py,sha256=tnH2St2jOB8cRunuodcXsdt6dxsU7dujfBli37J5pGo,2095
16
- arcjetCV/gui/main.py,sha256=9JEdFoEoWzGZSZ8AZKCV5HJuFXgdaYEpYP4RpKGaKxY,2128
11
+ arcjetCV/gui/main.py,sha256=mbQ26fKXYSOvipkyACgGeD4CS1PqHgEqPDnRGdrNkMk,2653
17
12
  arcjetCV/gui/main_window.py,sha256=Hxct6U6vCPI2O-3h8KwjOCAUxFQvdcZZwoGB0qcxyKM,50676
13
+ arcjetCV/gui/logo/arcjetCV_logo.icns,sha256=oxYpc3ettYktu5zsMWx1vofElnYz9jVZg70qWRBeUGQ,140715
14
+ arcjetCV/gui/logo/arcjetCV_logo.ico,sha256=GUeKE9903isQprycUXhWDN_ZhZmauE4Fse8n6r1K2C8,51872
18
15
  arcjetCV/gui/logo/arcjetCV_logo_.png,sha256=m0Ydni4gZ2Fau16hTXtOOVx7MvBIyaS_cF_4djNKKTg,93638
19
16
  arcjetCV/gui/logo/arcjetCV_logo_white.png,sha256=P2zZSy1VUqnHAhGAJPg7nsolMsYUtTabSIG2r7F1QmU,101105
20
17
  arcjetCV/segmentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ arcjetCV/segmentation/contour/Unet-xception-last-checkpoint.pt,sha256=opZRO5H-AH3UAItmuU3pmMSdAMGbX3M4V1T5I2UHTl0,134
19
+ arcjetCV/segmentation/contour/Unet-xception_25_original.pt,sha256=yJiL9nNFUfCflG1-piBHfX2m3IeQCuTJ9x9XlFAdiD0,134
21
20
  arcjetCV/segmentation/contour/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
21
  arcjetCV/segmentation/contour/cnn.py,sha256=4P67gjYOqZ3k22U5VRulSekc0Vl-F51yDXVyOF59EK4,1444
23
22
  arcjetCV/segmentation/contour/contour.py,sha256=yv2vcStiqDbxQQyqgy6vOicscJm4jZsjCtnqG4HUhpU,15041
24
23
  arcjetCV/segmentation/time/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ arcjetCV/segmentation/time/time-checkpoint.pt,sha256=TfSn5wVjS6qw_J1C6ry0SOqElVbYTad1adQIwVb1kKs,130
25
25
  arcjetCV/segmentation/time/time_segmentation.py,sha256=MkDKpKeQqugc7Yu8f21c4__hHPG1VmrLd_aTiYS2_YY,3927
26
26
  arcjetCV/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  arcjetCV/utils/logger.py,sha256=Xq0FFwivFKS7Wx1L_EMInEb9FpF6H46tXIkHiceI9a0,443
@@ -37,9 +37,9 @@ tests/test_functions.py,sha256=x_A_TDi2lzzOKr1W2YO08NHNHhdvU8TDNb8g1Dcdol4,4931
37
37
  tests/test_gui.py,sha256=d_xc7s5X6VFzYIyO9AvBZfOir8SruU1X30raskPZH9Q,18935
38
38
  tests/test_obj_models.py,sha256=QAk8uNhRGZPTHkHVx3gswzsPA-nbpOSM2pkjLR4_gRE,4131
39
39
  tests/test_segmentation.py,sha256=X3X66Ef-3FDID-xH6r637gx4zydD4BvKM8Sk5see97o,8296
40
- arcjetcv-0.0.7.dev2.dist-info/LICENSE,sha256=WSqTxCTC97vbTvtqTCphE6o0u4jrQQg4nuWHLjk33kU,12784
41
- arcjetcv-0.0.7.dev2.dist-info/METADATA,sha256=Few0FIBmj1y_UwSm13EJAF7sVkW2cR8CEw0s2jrm_1w,5903
42
- arcjetcv-0.0.7.dev2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
43
- arcjetcv-0.0.7.dev2.dist-info/entry_points.txt,sha256=IWfHYYfvKgoa5zhGibTEnJUHHTKChL2z81gysRPJxrk,86
44
- arcjetcv-0.0.7.dev2.dist-info/top_level.txt,sha256=8Eo3uozrbj-4LkXnIy2dU4IrkHYWIQROWpc-WYuUxiw,15
45
- arcjetcv-0.0.7.dev2.dist-info/RECORD,,
40
+ arcjetcv-0.0.7.dev4.dist-info/LICENSE,sha256=WSqTxCTC97vbTvtqTCphE6o0u4jrQQg4nuWHLjk33kU,12784
41
+ arcjetcv-0.0.7.dev4.dist-info/METADATA,sha256=RYDNX4BjycI-fEggqUDuHSwPUoPjuT6PzUN8ZCu2upY,5903
42
+ arcjetcv-0.0.7.dev4.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
43
+ arcjetcv-0.0.7.dev4.dist-info/entry_points.txt,sha256=IWfHYYfvKgoa5zhGibTEnJUHHTKChL2z81gysRPJxrk,86
44
+ arcjetcv-0.0.7.dev4.dist-info/top_level.txt,sha256=8Eo3uozrbj-4LkXnIy2dU4IrkHYWIQROWpc-WYuUxiw,15
45
+ arcjetcv-0.0.7.dev4.dist-info/RECORD,,
@@ -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
Binary file
@@ -1,48 +0,0 @@
1
- import cv2
2
- import numpy as np
3
- import matplotlib.pyplot as plt
4
-
5
- # Load the image
6
- image_path = "/Users/alexandrequintart/Downloads/IMG_3837.jpeg"
7
- image = cv2.imread(image_path)
8
- gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
9
-
10
- # Define pattern size based on the image details (4x9)
11
- pattern_size = (4, 9)
12
-
13
- # Try to detect the pattern
14
- found_chessboard, corners_chessboard = cv2.findChessboardCorners(gray, pattern_size)
15
-
16
- found_circles_grid, centers_circles_grid = cv2.findCirclesGrid(
17
- gray, pattern_size, flags=cv2.CALIB_CB_SYMMETRIC_GRID
18
- )
19
-
20
- found_asymmetric_grid, centers_asymmetric_grid = cv2.findCirclesGrid(
21
- gray, pattern_size, flags=cv2.CALIB_CB_ASYMMETRIC_GRID
22
- )
23
-
24
- # Visualize the result
25
- if found_chessboard:
26
- cv2.drawChessboardCorners(image, pattern_size, corners_chessboard, found_chessboard)
27
- detected_pattern = "Chessboard"
28
-
29
- elif found_circles_grid:
30
- cv2.drawChessboardCorners(image, pattern_size, centers_circles_grid, found_circles_grid)
31
- detected_pattern = "Symmetric Circles Grid"
32
-
33
- elif found_asymmetric_grid:
34
- cv2.drawChessboardCorners(image, pattern_size, centers_asymmetric_grid, found_asymmetric_grid)
35
- detected_pattern = "Asymmetric Circles Grid"
36
-
37
- else:
38
- detected_pattern = "No pattern detected"
39
-
40
- # Show the detected pattern
41
- plt.figure(figsize=(10, 6))
42
- plt.imshow(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
43
- plt.title(f"Detected Pattern: {detected_pattern}")
44
- plt.axis("off")
45
- plt.show()
46
-
47
- # Return detection results
48
- detected_pattern
Binary file
Binary file