Skip to content

Commit 0cde185

Browse files
committed
Adding electronics documentation
1 parent 4e4eda9 commit 0cde185

File tree

14 files changed

+714
-205
lines changed

14 files changed

+714
-205
lines changed

docs/01_Toolboxes/02_DiscoveryElectronics/01_automation_intro.md

Lines changed: 341 additions & 36 deletions
Large diffs are not rendered by default.

docs/01_Toolboxes/02_DiscoveryElectronics/02_camera_setup.md

Lines changed: 106 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: Camera Setup
33
title: openUC2 Camera Setup
44
---
55

6-
6+
**We provide Docker Containers for our 3 major camera manufacturers: https://github.com/openUC2/ImSwitchDockerInstall**
77

88
The openUC2 Camera Setup provides guidance on configuring and using webcams and Daheng cameras for imaging purposes within the openUC2 ecosystem. This setup allows users to seamlessly integrate cameras into their experimental setups and utilize them for imaging and data acquisition. Below are detailed instructions for setting up cameras on different platforms:
99

@@ -21,13 +21,67 @@ The openUC2 Camera Setup provides guidance on configuring and using webcams and
2121
## Daheng Cameras
2222

2323
![](IMAGES/dahenguc2.jpeg)
24+
*This may look completely different now, but important: A camera is inside the cube :)*
2425

2526
### On Windows
26-
- To use Daheng cameras on Windows, users should visit `https://www.get-cameras.com/customerdownloads?submissionGuid=93704570-544a-43e8-83d6-f5f3cf0b97fb`.
27+
- To use Daheng cameras on Windows, users should visit the [Get-camera supplier website](https://www.get-cameras.com/customerdownloads?submissionGuid=93704570-544a-43e8-83d6-f5f3cf0b97fb).
2728
- From the provided options, select the "Windows SDK USB2+USB3+GigE (including Directshow + Python) Galaxy V1.23.2305.9161" package.
2829
- Install the software and drivers from the downloaded package.
2930
- Once installed, users can start the "Galaxy Viewer" application to begin capturing images using the Daheng camera.
3031

32+
### Using Jetson Nano with Docker
33+
If you're using Jetson Nano for image acquisition, you can set up a Docker container:
34+
**We provide Docker Containers for our 3 major camera manufacturers: https://github.com/openUC2/ImSwitchDockerInstall**
35+
36+
### On Linux (Mac not supported)
37+
38+
You can install the driver and test the frame acquistion using the following commands:
39+
40+
```bash
41+
# We use Ubuntu
42+
# Install necessary dependencies
43+
sudo apt-get update && apt-get install -y \
44+
wget \
45+
unzip \
46+
python3 \
47+
python3-pip \
48+
usbutils \
49+
sudo \
50+
nano \
51+
git \
52+
expect
53+
54+
# Create the udev rules directory
55+
sudo mkdir -p /etc/udev/rules.d
56+
57+
# Download and install the appropriate Hik driver based on architecture
58+
cd /tmp && \
59+
wget https://dahengimaging.com/downloads/Galaxy_Linux_Python_2.0.2106.9041.tar_1.gz && \
60+
wget https://dahengimaging.com/downloads/Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202.zip && \
61+
unzip Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202.zip && \
62+
tar -zxvf Galaxy_Linux_Python_2.0.2106.9041.tar_1.gz && \
63+
cd Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202 && \
64+
chmod +x Galaxy_camera.run && \
65+
cd /tmp/Galaxy_Linux_Python_2.0.2106.9041/api && \
66+
python3 setup.py build && \
67+
python3 setup.py install
68+
69+
# Run the installer script using expect to automate Enter key presses
70+
echo "Y En Y" | /tmp/Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202/Galaxy_camera.run
71+
72+
# Copy libgxiapi.so to /usr/lib and set the library path
73+
cp /usr/lib/libgxiapi.so /usr/lib && \
74+
cp /tmp/Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202/libgxiapi.so /usr/lib && \
75+
ldconfig
76+
77+
# Ensure the library path is set
78+
LD_LIBRARY_PATH="/usr/lib:/tmp/Galaxy_Linux-armhf_Gige-U3_32bits-64bits_1.5.2303.9202:$LD_LIBRARY_PATH"
79+
80+
pip install pillow numpy
81+
```
82+
83+
Then checkout the files under `/tmp/Galaxy_Linux_Python_2.0.2106.9041/`
84+
3185
### On Android Phones
3286
- To use Daheng cameras on Android phones, users should first visit `https://www.get-cameras.com/customerdownloads?submissionGuid=93704570-544a-43e8-83d6-f5f3cf0b97fb`.
3387
- From the provided options, select the "Android USB3 SDK v1.2.2112.9201" package and download it.
@@ -36,6 +90,56 @@ The openUC2 Camera Setup provides guidance on configuring and using webcams and
3690
- Open the installed app ("GxViewer_GetRawImage") and grant access to the USB connection when prompted.
3791
- Users can adjust camera settings by swiping left in the app and then proceed to capture images.
3892

93+
Here is an extended documentation for the HIK camera setup:
94+
95+
### HIK Cameras
96+
97+
![](IMAGES/hikuc2.jpeg)
98+
*This may look completely different now, but important: A camera is inside the cube :)*
99+
100+
### On Windows
101+
- Visit the [HIK supplier website](https://www.hikrobotics.com/en/support/download) for the latest software.
102+
- Download the "MVS V2.1.2" package (or the latest version) for Windows.
103+
- Install the software and drivers from the package.
104+
- Use the "MVS Viewer" to capture and configure images with the HIK camera.
105+
106+
### On Linux (Ubuntu)
107+
Install the HIK driver and run the camera with the following steps:
108+
109+
```bash
110+
# Update system and install necessary dependencies
111+
sudo apt-get update && sudo apt-get install -y \
112+
wget \
113+
unzip \
114+
python3 \
115+
python3-pip \
116+
usbutils
117+
118+
# Download and unzip the HIK driver package
119+
cd /tmp && \
120+
wget https://www.hikrobotics.com/en/source/support/software/MVS_STD_GML_V2.1.2_231116.zip && \
121+
unzip MVS_STD_GML_V2.1.2_231116.zip
122+
123+
# Install the driver
124+
sudo dpkg -i MVS-2.1.2_aarch64_20231116.deb
125+
126+
# Set up environment variables
127+
export MVCAM_COMMON_RUNENV=/opt/MVS/lib
128+
export LD_LIBRARY_PATH=/opt/MVS/lib/64:/opt/MVS/lib/32:$LD_LIBRARY_PATH
129+
130+
# Install Python dependencies
131+
pip install pillow numpy
132+
133+
# Run the Python example to grab images
134+
python3 /opt/MVS/Samples/aarch64/Python/MvImport/GrabImage.py
135+
```
136+
137+
### Using Jetson Nano with Docker
138+
If you're using Jetson Nano for image acquisition, you can set up a Docker container:
139+
**We provide Docker Containers for our 3 major camera manufacturers: https://github.com/openUC2/ImSwitchDockerInstall**
140+
141+
142+
This setup ensures that the HIK camera can be used on various platforms, providing flexibility across different devices.
39143
## Video Tutorial
40144
A video tutorial demonstrating the camera setup is available at `https://youtu.be/PtdU5qE6BSc`.
41145

3.58 MB
Loading
622 KB
Loading
634 KB
Loading
706 KB
Loading
1.06 MB
Loading
1.1 MB
Loading
3.56 MB
Loading
3.56 MB
Loading

0 commit comments

Comments
 (0)