arcjetCV 0.0.7.dev6__tar.gz → 1.1.0.dev2__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.
Files changed (52) hide show
  1. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/PKG-INFO +57 -39
  2. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/README.md +48 -22
  3. arcjetcv-1.1.0.dev2/arcjetCV/calibration/calibrate_video.py +55 -0
  4. arcjetcv-1.1.0.dev2/arcjetCV/calibration/chessboard_pattern.png +0 -0
  5. arcjetcv-1.1.0.dev2/arcjetCV/calibration/detetct_example.py +48 -0
  6. arcjetcv-1.1.0.dev2/arcjetCV/calibration/rotated_pattern.png +0 -0
  7. arcjetcv-1.1.0.dev2/arcjetCV/chessboard_pattern.png +0 -0
  8. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/PKG-INFO +57 -39
  9. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/SOURCES.txt +5 -0
  10. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/setup.py +39 -13
  11. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/LICENSE +0 -0
  12. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/__init__.py +0 -0
  13. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/calibration/__init__.py +0 -0
  14. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/calibration/calibration_controller.py +0 -0
  15. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/calibration/calibration_main.py +0 -0
  16. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/calibration/calibration_model.py +0 -0
  17. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/calibration/calibration_view.py +0 -0
  18. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/__init__.py +0 -0
  19. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/_arcjetCV_gui.py +0 -0
  20. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/arcjetCV_gui.py +0 -0
  21. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/custom_classes.py +0 -0
  22. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/logo/arcjetCV_logo.icns +0 -0
  23. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/logo/arcjetCV_logo.ico +0 -0
  24. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/logo/arcjetCV_logo_.png +0 -0
  25. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/logo/arcjetCV_logo_white.png +0 -0
  26. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/main.py +0 -0
  27. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/gui/main_window.py +0 -0
  28. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/__init__.py +0 -0
  29. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/contour/__init__.py +0 -0
  30. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/contour/cnn.py +0 -0
  31. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/contour/contour.py +0 -0
  32. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/time/__init__.py +0 -0
  33. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/segmentation/time/time_segmentation.py +0 -0
  34. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/__init__.py +0 -0
  35. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/logger.py +0 -0
  36. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/output.py +0 -0
  37. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/processor.py +0 -0
  38. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/utils.py +0 -0
  39. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV/utils/video.py +0 -0
  40. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/dependency_links.txt +0 -0
  41. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/entry_points.txt +0 -0
  42. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/requires.txt +0 -0
  43. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/arcjetCV.egg-info/top_level.txt +0 -0
  44. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/setup.cfg +0 -0
  45. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/README.md +0 -0
  46. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/__init__.py +0 -0
  47. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_calibration_functions.py +0 -0
  48. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_calibration_gui.py +0 -0
  49. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_functions.py +0 -0
  50. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_gui.py +0 -0
  51. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_obj_models.py +0 -0
  52. {arcjetcv-0.0.7.dev6 → arcjetcv-1.1.0.dev2}/tests/test_segmentation.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: arcjetCV
3
- Version: 0.0.7.dev6
3
+ Version: 1.1.0.dev2
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
@@ -26,15 +26,6 @@ Requires-Dist: scikit-learn
26
26
  Requires-Dist: segmentation-models-pytorch
27
27
  Requires-Dist: torch
28
28
  Requires-Dist: torchvision
29
- Dynamic: author
30
- Dynamic: classifier
31
- Dynamic: description
32
- Dynamic: description-content-type
33
- Dynamic: home-page
34
- Dynamic: platform
35
- Dynamic: project-url
36
- Dynamic: requires-dist
37
- Dynamic: summary
38
29
 
39
30
  [![Documentation Status](https://readthedocs.org/projects/arcjetcv/badge/?version=latest)](https://arcjetcv.readthedocs.io/en/latest/?badge=latest)
40
31
  [![Anaconda-Server Badge](https://anaconda.org/conda-forge/arcjetcv/badges/version.svg)](https://anaconda.org/conda-forge/arcjetcv)
@@ -43,86 +34,113 @@ Dynamic: summary
43
34
  -----
44
35
 
45
36
  <div align="center">
46
- <img src="https://github.com/magnus-haw/arcjetCV/blob/main/arcjetCV/gui/logo/arcjetCV_logo_.png" alt="arcjetCV Logo" width="30%">
37
+ <img src="https://raw.githubusercontent.com/magnus-haw/arcjetCV/main/arcjetCV/gui/logo/arcjetCV_logo_.png" alt="arcjetCV Logo" width="30%">
38
+
47
39
  </div>
48
40
 
49
41
  # arcjetCV
50
42
 
51
43
  Package to process arcjet videos and segment the edge of the shock and of the sample.
52
44
 
53
- ![arcjetCV Functionality](https://github.com/magnus-haw/arcjetCV/blob/main/docs/source/arcjet_video.gif)
45
+ ![arcjetCV Functionality](https://i.imgur.com/YOUR_IMAGE_ID.gif)
54
46
 
55
47
  ## Installation
56
48
 
57
- ### Prerequisites
49
+ ### PyPi Installation (Universal)
58
50
 
59
- Before you start, ensure you have the following tools installed on your system:
51
+ #### Prerequisites:
52
+ - Ensure you have **Python 3.8** or higher installed.
60
53
 
54
+ To install **arcjetCV** via **pip** from **PyPi**, run:
61
55
 
62
- 1. **Miniconda or Anaconda:** Follow the respective installation guide for [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/) or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).
63
- 2. **(macOS only) Install Xcode Command Line Tools:**
56
+ ```bash
57
+ pip install arcjetCV
58
+ ```
64
59
 
65
- Ensure that you have the Xcode Command Line Tools installed by running:
60
+ This will install **arcjetCV** along with its dependencies.
66
61
 
67
- ```bash
68
- xcode-select --install
69
- ```
70
-
71
- ### Unix Users (Linux and macOS)
62
+ #### Note for macOS Users:
63
+ You might need to install Xcode Command Line Tools:
72
64
 
73
- The software can be installed by running:
65
+ ```bash
66
+ xcode-select --install
67
+ ```
74
68
 
69
+ #### Note for Linux Users:
70
+
71
+ You may need to install **libxcb-cursor**. Use your package manager to install it:
72
+
73
+ For **Ubuntu/Debian**-based distributions:
75
74
  ```bash
76
- conda create --name arcjetcv conda-forge::arcjetcv
75
+ sudo apt-get install libxcb-cursor0
77
76
  ```
78
77
 
79
- ### Windows Users and Developers
78
+ For **Fedora**:
79
+ ```bash
80
+ sudo dnf install libxcb-cursor
81
+ ```
80
82
 
81
- For local development of arcjetCV and for Windows users, these are the recommended installation steps:
83
+ For **Arch Linux**:
84
+ ```bash
85
+ sudo pacman -S libxcb
86
+ ```
82
87
 
83
- 1. **Install `git`:**
88
+ ### Developer Installation
89
+
90
+ #### Prerequisites:
91
+ - A valid **git** installation.
92
+ - **Miniconda** or **Anaconda** for environment and package management:
93
+ - [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/)
94
+ - [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html)
95
+ - For **macOS** users make sure the Xcode Command Line Tools are installed:
96
+ ```bash
97
+ xcode-select --install
98
+ ```
84
99
 
85
- You can download and install it from [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
100
+ To install **arcjetCV** for development puropse, follow these steps:
86
101
 
87
- 2. **Install `git lfs` (Git Large File Storage):**
102
+ 1. Install `git-lfs`:
88
103
 
89
- You can download and install it from [here](https://git-lfs.github.com/).
104
+ Download and install it from [here](https://git-lfs.github.com/).
90
105
 
91
- 3. **Clone the repository and install the package:**
106
+ 2. Clone the repository and install the package:
92
107
 
93
108
  ```bash
94
109
  git clone https://github.com/magnus-haw/arcjetCV.git
95
110
  cd arcjetCV
96
111
  conda env create -f env/arcjetCV_env_[cpu/gpu].yml
97
- conda activate arcjetCV
98
- python -m pip install -e .
112
+ conda activate arcjetcv
113
+ python -m pip install -e .
99
114
  ```
100
115
 
101
- The -e flag stands for 'editable' and it means that any change to the local source code will have immediate effect on the arcjetCV python package and GUI.
116
+ The `-e` flag stands for 'editable' and means that any changes to the local source code will immediately affect the **arcjetCV** package and GUI.
117
+
102
118
 
103
119
  ## How to Run
104
120
 
105
121
  You can now launch the GUI by running:
106
122
 
107
123
  ```bash
108
- conda activate arcjetCV
124
+ conda activate arcjetcv # (if using conda)
109
125
  arcjetCV
110
126
  ```
111
127
 
112
- or you can import arcjetCV's python API inside a python script, e.g. test.py:
128
+ Alternatively, you can use **arcjetCV's Python API** inside a Python script, e.g., `test.py`:
113
129
 
114
130
  ```python
115
131
  import arcjetCV as arcv
116
132
  video = arcv.Video("tests/arcjet_test.mp4")
117
133
  ```
118
134
 
119
- and then run it as:
135
+ Run the script with:
120
136
 
121
137
  ```bash
122
- conda activate arcjetCV
138
+ conda activate arcjetcv # (if using conda)
123
139
  python test.py
124
140
  ```
125
141
 
142
+
143
+
126
144
  ## Citing
127
145
 
128
146
  If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://arxiv.org/abs/2404.11492):
@@ -16,51 +16,77 @@ Package to process arcjet videos and segment the edge of the shock and of the sa
16
16
 
17
17
  ## Installation
18
18
 
19
- ### Prerequisites
19
+ ### PyPi Installation (Universal)
20
20
 
21
- Before you start, ensure you have the following tools installed on your system:
21
+ #### Prerequisites:
22
+ - Ensure you have **Python 3.8** or higher installed.
22
23
 
24
+ To install **arcjetCV** via **pip** from **PyPi**, run:
23
25
 
24
- 1. **Miniconda or Anaconda:** Follow the respective installation guide for [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/) or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).
25
- 2. **(macOS only) Install Xcode Command Line Tools:**
26
+ ```bash
27
+ pip install arcjetCV
28
+ ```
29
+
30
+ This will install **arcjetCV** along with its dependencies.
31
+
32
+ #### Note for macOS Users:
33
+ You might need to install Xcode Command Line Tools:
26
34
 
27
- Ensure that you have the Xcode Command Line Tools installed by running:
35
+ ```bash
36
+ xcode-select --install
37
+ ```
28
38
 
29
- ```bash
30
- xcode-select --install
31
- ```
32
-
33
- ### Unix Users (Linux and macOS)
39
+ #### Note for Linux Users:
34
40
 
35
- The software can be installed by running:
41
+ You may need to install **libxcb-cursor**. Use your package manager to install it:
42
+
43
+ For **Ubuntu/Debian**-based distributions:
44
+ ```bash
45
+ sudo apt-get install libxcb-cursor0
46
+ ```
36
47
 
48
+ For **Fedora**:
37
49
  ```bash
38
- conda create --name arcjetcv conda-forge::arcjetcv
50
+ sudo dnf install libxcb-cursor
39
51
  ```
40
52
 
41
- ### Windows Users and Developers
53
+ For **Arch Linux**:
54
+ ```bash
55
+ sudo pacman -S libxcb
56
+ ```
42
57
 
43
- For local development of arcjetCV and for Windows users, these are the recommended installation steps:
58
+ ### Developer Installation
44
59
 
45
- 1. **Install `git`:**
60
+ #### Prerequisites:
61
+ - A valid **git** installation.
62
+ - **Miniconda** or **Anaconda** for environment and package management:
63
+ - [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/)
64
+ - [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html)
46
65
 
47
- You can download and install it from [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
66
+ To install **arcjetCV** for development puropse, follow these steps:
48
67
 
49
- 2. **Install `git lfs` (Git Large File Storage):**
68
+ 1. Install `git-lfs`:
50
69
 
51
- You can download and install it from [here](https://git-lfs.github.com/).
70
+ Download and install it from [here](https://git-lfs.github.com/).
52
71
 
53
- 3. **Clone the repository and install the package:**
72
+ 2. Clone the repository and install the package:
54
73
 
55
74
  ```bash
56
75
  git clone https://github.com/magnus-haw/arcjetCV.git
57
76
  cd arcjetCV
58
77
  conda env create -f env/arcjetCV_env_[cpu/gpu].yml
59
- conda activate arcjetCV
60
- python -m pip install -e .
78
+ conda activate arcjetcv
79
+ python -m pip install -e .
61
80
  ```
62
81
 
63
- The -e flag stands for 'editable' and it means that any change to the local source code will have immediate effect on the arcjetCV python package and GUI.
82
+ The `-e` flag stands for 'editable' and means that any changes to the local source code will immediately affect the **arcjetCV** package and GUI.
83
+
84
+ #### Note for macOS Users:
85
+ You might need to install Xcode Command Line Tools:
86
+
87
+ ```bash
88
+ xcode-select --install
89
+ ```
64
90
 
65
91
  ## How to Run
66
92
 
@@ -0,0 +1,55 @@
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
@@ -0,0 +1,48 @@
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
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: arcjetCV
3
- Version: 0.0.7.dev6
3
+ Version: 1.1.0.dev2
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
@@ -26,15 +26,6 @@ Requires-Dist: scikit-learn
26
26
  Requires-Dist: segmentation-models-pytorch
27
27
  Requires-Dist: torch
28
28
  Requires-Dist: torchvision
29
- Dynamic: author
30
- Dynamic: classifier
31
- Dynamic: description
32
- Dynamic: description-content-type
33
- Dynamic: home-page
34
- Dynamic: platform
35
- Dynamic: project-url
36
- Dynamic: requires-dist
37
- Dynamic: summary
38
29
 
39
30
  [![Documentation Status](https://readthedocs.org/projects/arcjetcv/badge/?version=latest)](https://arcjetcv.readthedocs.io/en/latest/?badge=latest)
40
31
  [![Anaconda-Server Badge](https://anaconda.org/conda-forge/arcjetcv/badges/version.svg)](https://anaconda.org/conda-forge/arcjetcv)
@@ -43,86 +34,113 @@ Dynamic: summary
43
34
  -----
44
35
 
45
36
  <div align="center">
46
- <img src="https://github.com/magnus-haw/arcjetCV/blob/main/arcjetCV/gui/logo/arcjetCV_logo_.png" alt="arcjetCV Logo" width="30%">
37
+ <img src="https://raw.githubusercontent.com/magnus-haw/arcjetCV/main/arcjetCV/gui/logo/arcjetCV_logo_.png" alt="arcjetCV Logo" width="30%">
38
+
47
39
  </div>
48
40
 
49
41
  # arcjetCV
50
42
 
51
43
  Package to process arcjet videos and segment the edge of the shock and of the sample.
52
44
 
53
- ![arcjetCV Functionality](https://github.com/magnus-haw/arcjetCV/blob/main/docs/source/arcjet_video.gif)
45
+ ![arcjetCV Functionality](https://i.imgur.com/YOUR_IMAGE_ID.gif)
54
46
 
55
47
  ## Installation
56
48
 
57
- ### Prerequisites
49
+ ### PyPi Installation (Universal)
58
50
 
59
- Before you start, ensure you have the following tools installed on your system:
51
+ #### Prerequisites:
52
+ - Ensure you have **Python 3.8** or higher installed.
60
53
 
54
+ To install **arcjetCV** via **pip** from **PyPi**, run:
61
55
 
62
- 1. **Miniconda or Anaconda:** Follow the respective installation guide for [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/) or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).
63
- 2. **(macOS only) Install Xcode Command Line Tools:**
56
+ ```bash
57
+ pip install arcjetCV
58
+ ```
64
59
 
65
- Ensure that you have the Xcode Command Line Tools installed by running:
60
+ This will install **arcjetCV** along with its dependencies.
66
61
 
67
- ```bash
68
- xcode-select --install
69
- ```
70
-
71
- ### Unix Users (Linux and macOS)
62
+ #### Note for macOS Users:
63
+ You might need to install Xcode Command Line Tools:
72
64
 
73
- The software can be installed by running:
65
+ ```bash
66
+ xcode-select --install
67
+ ```
74
68
 
69
+ #### Note for Linux Users:
70
+
71
+ You may need to install **libxcb-cursor**. Use your package manager to install it:
72
+
73
+ For **Ubuntu/Debian**-based distributions:
75
74
  ```bash
76
- conda create --name arcjetcv conda-forge::arcjetcv
75
+ sudo apt-get install libxcb-cursor0
77
76
  ```
78
77
 
79
- ### Windows Users and Developers
78
+ For **Fedora**:
79
+ ```bash
80
+ sudo dnf install libxcb-cursor
81
+ ```
80
82
 
81
- For local development of arcjetCV and for Windows users, these are the recommended installation steps:
83
+ For **Arch Linux**:
84
+ ```bash
85
+ sudo pacman -S libxcb
86
+ ```
82
87
 
83
- 1. **Install `git`:**
88
+ ### Developer Installation
89
+
90
+ #### Prerequisites:
91
+ - A valid **git** installation.
92
+ - **Miniconda** or **Anaconda** for environment and package management:
93
+ - [Miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/)
94
+ - [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html)
95
+ - For **macOS** users make sure the Xcode Command Line Tools are installed:
96
+ ```bash
97
+ xcode-select --install
98
+ ```
84
99
 
85
- You can download and install it from [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
100
+ To install **arcjetCV** for development puropse, follow these steps:
86
101
 
87
- 2. **Install `git lfs` (Git Large File Storage):**
102
+ 1. Install `git-lfs`:
88
103
 
89
- You can download and install it from [here](https://git-lfs.github.com/).
104
+ Download and install it from [here](https://git-lfs.github.com/).
90
105
 
91
- 3. **Clone the repository and install the package:**
106
+ 2. Clone the repository and install the package:
92
107
 
93
108
  ```bash
94
109
  git clone https://github.com/magnus-haw/arcjetCV.git
95
110
  cd arcjetCV
96
111
  conda env create -f env/arcjetCV_env_[cpu/gpu].yml
97
- conda activate arcjetCV
98
- python -m pip install -e .
112
+ conda activate arcjetcv
113
+ python -m pip install -e .
99
114
  ```
100
115
 
101
- The -e flag stands for 'editable' and it means that any change to the local source code will have immediate effect on the arcjetCV python package and GUI.
116
+ The `-e` flag stands for 'editable' and means that any changes to the local source code will immediately affect the **arcjetCV** package and GUI.
117
+
102
118
 
103
119
  ## How to Run
104
120
 
105
121
  You can now launch the GUI by running:
106
122
 
107
123
  ```bash
108
- conda activate arcjetCV
124
+ conda activate arcjetcv # (if using conda)
109
125
  arcjetCV
110
126
  ```
111
127
 
112
- or you can import arcjetCV's python API inside a python script, e.g. test.py:
128
+ Alternatively, you can use **arcjetCV's Python API** inside a Python script, e.g., `test.py`:
113
129
 
114
130
  ```python
115
131
  import arcjetCV as arcv
116
132
  video = arcv.Video("tests/arcjet_test.mp4")
117
133
  ```
118
134
 
119
- and then run it as:
135
+ Run the script with:
120
136
 
121
137
  ```bash
122
- conda activate arcjetCV
138
+ conda activate arcjetcv # (if using conda)
123
139
  python test.py
124
140
  ```
125
141
 
142
+
143
+
126
144
  ## Citing
127
145
 
128
146
  If you use arcjetCV in your research, please use the following BibTeX entry to cite [our paper](https://arxiv.org/abs/2404.11492):
@@ -2,6 +2,7 @@ LICENSE
2
2
  README.md
3
3
  setup.py
4
4
  arcjetCV/__init__.py
5
+ arcjetCV/chessboard_pattern.png
5
6
  arcjetCV.egg-info/PKG-INFO
6
7
  arcjetCV.egg-info/SOURCES.txt
7
8
  arcjetCV.egg-info/dependency_links.txt
@@ -9,10 +10,14 @@ arcjetCV.egg-info/entry_points.txt
9
10
  arcjetCV.egg-info/requires.txt
10
11
  arcjetCV.egg-info/top_level.txt
11
12
  arcjetCV/calibration/__init__.py
13
+ arcjetCV/calibration/calibrate_video.py
12
14
  arcjetCV/calibration/calibration_controller.py
13
15
  arcjetCV/calibration/calibration_main.py
14
16
  arcjetCV/calibration/calibration_model.py
15
17
  arcjetCV/calibration/calibration_view.py
18
+ arcjetCV/calibration/chessboard_pattern.png
19
+ arcjetCV/calibration/detetct_example.py
20
+ arcjetCV/calibration/rotated_pattern.png
16
21
  arcjetCV/gui/__init__.py
17
22
  arcjetCV/gui/_arcjetCV_gui.py
18
23
  arcjetCV/gui/arcjetCV_gui.py
@@ -3,7 +3,7 @@ import sys
3
3
  import os
4
4
 
5
5
  # Read the README file for long description
6
- with open("README.md", "r", encoding="utf-8") as fh:
6
+ with open("README_pypi.md", "r", encoding="utf-8") as fh:
7
7
  long_description = fh.read()
8
8
 
9
9
 
@@ -13,10 +13,20 @@ def check_linux_dependencies():
13
13
 
14
14
  # List of required packages
15
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"
16
+ "libxcb-xinerama0",
17
+ "libxcb1",
18
+ "libx11-xcb1",
19
+ "libxcb-cursor0",
20
+ "libxcb-icccm4",
21
+ "libxcb-keysyms1",
22
+ "libxcb-render-util0",
23
+ "libxcb-shape0",
24
+ "libxcb-xfixes0",
25
+ "libxcb-randr0",
26
+ "libxcb-util1",
27
+ "libxcb-image0",
28
+ "libxcb-sync1",
29
+ "libxcb-xinput0",
20
30
  ]
21
31
 
22
32
  try:
@@ -24,27 +34,39 @@ def check_linux_dependencies():
24
34
  with open("/etc/os-release") as f:
25
35
  os_info = f.read().lower()
26
36
  if "ubuntu" in os_info or "debian" in os_info:
27
- print("\n[INFO] Ubuntu/Debian detected. Installing dependencies via APT...")
37
+ print(
38
+ "\n[INFO] Ubuntu/Debian detected. Installing dependencies via APT..."
39
+ )
28
40
  subprocess.run(["sudo", "apt", "update"], check=True)
29
- subprocess.run(["sudo", "apt", "install", "-y"] + required_packages, check=True)
41
+ subprocess.run(
42
+ ["sudo", "apt", "install", "-y"] + required_packages, check=True
43
+ )
30
44
  print("\n[INFO] System dependencies installed successfully.")
31
45
  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))
46
+ print(
47
+ "\n[WARNING] Non-Debian system detected. Please install the dependencies manually."
48
+ )
49
+ print(
50
+ "\n[INFO] Run one of the following commands based on your distribution:"
51
+ )
52
+ print(
53
+ "\n[Ubuntu/Debian] sudo apt-get install "
54
+ + " ".join(required_packages)
55
+ )
35
56
  print("[Fedora] sudo dnf install libxcb libX11-xcb libxcb-cursor")
36
57
  print("[Arch] sudo pacman -S libxcb xcb-util xcb-util-cursor\n")
37
-
58
+
38
59
  except Exception as e:
39
60
  print(f"\n[ERROR] Could not determine Linux distribution: {e}")
40
61
 
62
+
41
63
  # Run the platform check before proceeding
42
64
  check_linux_dependencies()
43
65
 
44
66
  # Define the setup configuration
45
67
  setup(
46
68
  name="arcjetCV",
47
- version="0.0.7.dev6", # Set the version directly here
69
+ version="1.1.0.dev2", # Set the version directly here
48
70
  author="arcjetCV team",
49
71
  description="Package to process arcjet videos and segment the edge of the shock and of the sample",
50
72
  long_description=long_description,
@@ -54,7 +76,11 @@ setup(
54
76
  include_package_data=True, # Include package data based on the rules below
55
77
  package_data={
56
78
  "": ["*.txt", "*.md", "*.png", "*.gif"], # Include these file types
57
- "arcjetCV": ["gui/logo/*.png", "gui/logo/*.ico", "gui/logo/*.icns"], # Include specific logo images
79
+ "arcjetCV": [
80
+ "gui/logo/*.png",
81
+ "gui/logo/*.ico",
82
+ "gui/logo/*.icns",
83
+ ], # Include specific logo images
58
84
  },
59
85
  exclude_package_data={
60
86
  "arcjetCV": [
File without changes
File without changes