From 164a44d4c483723a3cfb7dbf6f51c1764d2ecdad Mon Sep 17 00:00:00 2001
From: LexvanGastel <l.vangastel@studen.utwente.nl>
Date: Thu, 3 Apr 2025 11:01:11 +0200
Subject: [PATCH] Q3main

---
 Q2main.py |  2 +-
 Q3main.py | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 Q3main.py

diff --git a/Q2main.py b/Q2main.py
index b3159a4..ee85e4a 100644
--- a/Q2main.py
+++ b/Q2main.py
@@ -48,7 +48,7 @@ class ImageProcessor:
 
         return red_mask, yellow_mask, green_mask
 
-def detect_blobs(mask, min_sigma=3, max_sigma=15, num_sigma = 3, threshold=0.5):
+def detect_blobs(mask, min_sigma=5, max_sigma=50, num_sigma = 10, threshold=0.5):
     mask = mask.astype(np.float64) / 255.0 
     #print('mask made')
     blobs = blob_log(mask, min_sigma=min_sigma, max_sigma=max_sigma, num_sigma=num_sigma, threshold=threshold)
diff --git a/Q3main.py b/Q3main.py
new file mode 100644
index 0000000..485bda4
--- /dev/null
+++ b/Q3main.py
@@ -0,0 +1,27 @@
+import scipy.io
+
+# Load the .mat file
+mat_file = 'emg_data_walking.mat'
+data = scipy.io.loadmat(mat_file)
+
+# Display the keys in the loaded structure
+print("Keys in the loaded .mat file:", data.keys())
+
+# Analyze the structure of the data (check what is inside the 'data' dictionary)
+# This will help you understand what variables are present
+for key, value in data.items():
+    print(f"Key: {key}, Type: {type(value)}")
+    print(f"Value shape: {value.shape if hasattr(value, 'shape') else 'N/A'}\n")
+
+# Now, assuming the EMG channels are contained in a variable called 'emgChannels'
+# You will need to adjust the field name depending on the structure of your file
+if 'emgChannels' in data:
+    emg_channels = data['emgChannels']
+    
+    # If 'emgChannels' contains the names, extract and display them
+    if isinstance(emg_channels, np.ndarray) and emg_channels.ndim == 2:
+        print("\nEMG Channel Names:")
+        for channel in emg_channels.flatten():
+            print(channel)
+else:
+    print("\n'EMG channels' not found in the data. Please check the structure.")
\ No newline at end of file
-- 
GitLab