基本思想:需要使用linux系统调用alliedvisio工业相机完成业务,这里只做驱动相机调用,具体不涉及业务开发
Alvium 相机选型 - Allied Vision
一、先用软件调用一下用于机器视觉和嵌入式视觉的Vimba X 软件开发包 - Allied Vision
VimbaX_Setup-2023-4-Linux64.tar.gz,然后参考用户手册配置
ubuntu@ubuntu:~/Downloads/VimbaX_Setup-2023-4-Linux64/VimbaX_2023-4/cti$ sudo ./VimbaGigETL_Install.sh
Registering GENICAM_GENTL64_PATH
Done
Please log off once before using the GigE transport layer
ubuntu@ubuntu:~/Downloads/VimbaX_Setup-2023-4-Linux64/VimbaX_2023-4/cti$ sudo ./VimbaUSBTL_Install.sh
Registering GENICAM_GENTL64_PATH
Registering AVTUSBTL device types
Done
Please reboot before using the USB transport layer
二、关机重启之后,使用非超级权限启动viewer
ubuntu@ubuntu:~/Downloads/VimbaX_Setup-2023-4-Linux64/VimbaX_2023-4/bin$ ./VimbaXViewer
三、使用python代码调用该相机
ubuntu@ubuntu:~/Downloads/VimbaX_Setup-2023-4-Linux64/VimbaX_2023-4/api/python$ pip3 install vmbpy-1.0.4-py3-none-any.whl
Processing ./vmbpy-1.0.4-py3-none-any.whl
Installing collected packages: vmbpy
Successfully installed vmbpy-1.0.4
测试相机使用官方的demo
ubuntu@ubuntu:~$ git clone https://github.com/alliedvision/VmbPy.git
Cloning into 'VmbPy'...
remote: Enumerating objects: 4891, done.
remote: Counting objects: 100% (4891/4891), done.
remote: Compressing objects: 100% (1267/1267), done.
remote: Total 4891 (delta 3670), reused 4837 (delta 3616), pack-reused 0
Receiving objects: 100% (4891/4891), 932.50 KiB | 616.00 KiB/s, done.
Resolving deltas: 100% (3670/3670), done.
ubuntu@ubuntu:~$ cd VmbPy/Examples/
ubuntu@ubuntu:~/VmbPy/Examples$ ls
action_commands.py event_handling.py multithreading_opencv.py
asynchronous_grab_opencv.py list_cameras.py synchronous_grab.py
asynchronous_grab.py list_chunk_data.py user_set.py
convert_pixel_format.py list_features.py
create_trace_log.py load_save_settings.py
ubuntu@ubuntu:~/VmbPy/Examples$ python3 asynchronous_grab_opencv.py
///
/// VmbPy Asynchronous Grab with OpenCV Example ///
///
测试相机可以正常打开
四、ubuntu上使用c++调用,调用官方的c++,等着研究剔除无用的代码