HuaTeng Vision
Linux SDK use
1. linux SDK
Technical Support Email: mdwvision@[Link]
Boot Linux system,Create folder MVSDK,Copy linuxSDK package to the directory
Note: Administrator status is required to run the program.
Open terminal
Enter cd MVSDK to enter the MVSDK directory
tar -zxvf linuxSDK_V2.[Link] Unzip to the current directory
[Link]
HuaTeng Vision
Execute the script, copy the library and header files to the system directory
sudo ./[Link]
[Link]
HuaTeng Vision
If the installation script fails, you can manually copy the library and header files to complete
the installation
#copy header file
sudo cp MVSDK/include/* /usr/include/
#Copy the corresponding platform library
x86 64-bit system:sudo cp MVSDK/lib/x64/[Link] /lib
arm 32 hard floating point system:sudo cp MVSDK/lib/arm/[Link] /lib
arm 32 soft floating point system:sudo cp MVSDK/lib/arm_softfp/[Link] /lib
arm 64-bit system:sudo cp MVSDK/lib/arm64/[Link] /lib
2. The camera cannot be found when running the Demo
The number of cameras is 0
[Link] port
1. Turn off firewall sudo ufw disable
2. 2. Configure the network card IP of the linux computer as a fixed IP
3. Edit/etc/sysctl.d/[Link] Document,Set rp_filter to 0,
4. As follows:# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks.
[Link].rp_filter=0
[Link].rp_filter=0
Restart the computer to take effect
[Link]
HuaTeng Vision
2. USB
1. Lsusb Check if the driver is loaded successfully f622:da01 The beginning of f622 means
that the Huateng Vision camera has successfully loaded the driver
2. sudo Run
3. Try to change other USB ports
4. In a virtual machine, when using a USB3.0 camera, the USB controller sets the USB3.0
mode
3. Common errors when opening the camera
Return -13, the camera has been turned on, or the IP of the network card and the IP of the
camera are not in the same network segment. Try to modify the camera IP, see for details
Camera IP Configuration。
[Link]
HuaTeng Vision
4. Camera IP Configuration
1. QT tool to modify IP (only supports x64)
Toolpath:tools/QGeConfigTools/QGeConfigTools
1. Automatically update IP
Select the camera to be modified, select DHCP mode, tick Save configuration, click the
button to automatically update IP address, the IP modification is successful
[Link]
HuaTeng Vision
2. Update IP manually
If you need to modify it to a specific IP, select the static mode, enter the IP address, subnet
mask, gateway, tick Save the configuration, click the Update IP Address button, and the IP
modification is successful.
[Link]
HuaTeng Vision
[Link]
HuaTeng Vision
[Link]
HuaTeng Vision
2. Command line tool to modify IP (support x86, x64, arm, arm64)
Toolpath:
x86: tools/GeConfigCmd/x86/GeConfigCmd
x64: tools/GeConfigCmd/x64/GeConfigCmd
arm: tools/GeConfigCmd/arm/GeConfigCmd
arm64: tools/GeConfigCmd/arm64/GeConfigCmd
Run the tool and enter r to automatically modify the IP
./GeConfigCmd
[Link]
HuaTeng Vision
3. Compile GTK_Demo
1. Install the GTK library
Install the GTK library, clean the project, compile with make, run ./Gtk_Demo, enter 0 to open the
first camera
sudo apt-get install libgtk2.0-dev
cd MVSDK/demo/GTK_Demo #enter the directory
make clean #clean project
make #compile GTKdemo
[Link]
HuaTeng Vision
No obvious errors, you can directly execute GTK_DEMO
sudo ./GTK_demo
Select the first camera, press 0 to start by default, enter 0 and press
Enter to open the first camera
4. Compile multicamera_demo
Clean the project, make compile, run the program, open 2 cameras
cd MVSDK/demo/multicamera_demo
make clean
make
[Link]
HuaTeng Vision
No obvious errors, run the program
sudo ./multicamera_demo
5. Compile OpenCv
Install opencv first, or download the source code from the official
website, compile it, enter the directory, compile, and run
cd MVSDK/demo/OpenCv
make
sudo ./main #Run
[Link]
HuaTeng Vision
6. compile QT_Demo4
1. You need to install Qt first
Open Qt, open the project, select the pro file, open, select the corresponding builder
(QT_Demo4 changed to QT5)
[Link]
HuaTeng Vision
Start building
Pro file added QT += widgets
INCLUDEPATH += .././include #Revise
LIBS += -L/lib -lMVSDK #Revise
[Link]
HuaTeng Vision
if it appears #include <QtGui/QApplication> Error change to#include <QApplication>
There are a lot of errors, add a header file reference
mainwindow.h Add reference to header file
#include <QLabel>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <QRadioButton>
#include <QDesktopWidget>
#include <QFileDialog>
#include <QTextCodec>
#include <QMessageBox>
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GB2312")); Delete
fileDialog->seFilterst(tr("config Files(*.config )"));
Change to
fileDialog->setNameFilters(QStringList()<<tr("config Files(*.config )"));
[Link]
HuaTeng Vision
7. Compile QT_Demo5
1. You need to install Qt first
Open Qt, open the project, select the pro file, open, select the corresponding builder,
compile and run, you can
[Link]
HuaTeng Vision
[Link]
HuaTeng Vision
8. Compile Sampli_Save_Demo
Enter the directory, clean the project, make compile ./demo run, enter 0,
open the 0th camera, save an image
cd MVSDK/demo/Sampli_Save_Demo
make clean
make
sudo ./demo
[Link]
HuaTeng Vision
[Link]