Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
180 views

LinuxSDK Document

The document provides instructions for installing and using the HuaTeng Vision Linux SDK. It describes downloading and unpacking the SDK package, installing library and header files through a script or manually, checking for camera detection and modifying camera IP settings if needed, and compiling and running sample demo programs using the SDK in C/C++, OpenCV, GTK, Qt and other environments. Troubleshooting tips are provided for common errors.

Uploaded by

Joao Thome
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views

LinuxSDK Document

The document provides instructions for installing and using the HuaTeng Vision Linux SDK. It describes downloading and unpacking the SDK package, installing library and header files through a script or manually, checking for camera detection and modifying camera IP settings if needed, and compiling and running sample demo programs using the SDK in C/C++, OpenCV, GTK, Qt and other environments. Troubleshooting tips are provided for common errors.

Uploaded by

Joao Thome
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

HuaTeng Vision

Linux SDK use


1. linux SDK
Technical Support Email: mdwvision@163.com
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.1.0.xx.tar.gz Unzip to the current directory

http://www.huatengvision.com/
HuaTeng Vision

Execute the script, copy the library and header files to the system directory
sudo ./install.sh

http://www.huatengvision.com/
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/libMVSDK.so /lib
arm 32 hard floating point system:sudo cp MVSDK/lib/arm/libMVSDK.so /lib
arm 32 soft floating point system:sudo cp MVSDK/lib/arm_softfp/libMVSDK.so /lib
arm 64-bit system:sudo cp MVSDK/lib/arm64/libMVSDK.so /lib

2. The camera cannot be found when running the Demo


The number of cameras is 0

1.Network 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/10-network-security.conf Document,Set rp_filter to 0,
4. As follows:# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks.
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0
Restart the computer to take effect

http://www.huatengvision.com/
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。

http://www.huatengvision.com/
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

http://www.huatengvision.com/
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.

http://www.huatengvision.com/
HuaTeng Vision

http://www.huatengvision.com/
HuaTeng Vision

http://www.huatengvision.com/
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

http://www.huatengvision.com/
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

http://www.huatengvision.com/
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

http://www.huatengvision.com/
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

http://www.huatengvision.com/
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)

http://www.huatengvision.com/
HuaTeng Vision

Start building
Pro file added QT += widgets
INCLUDEPATH += .././include #Revise
LIBS += -L/lib -lMVSDK #Revise

http://www.huatengvision.com/
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 )"));

http://www.huatengvision.com/
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

http://www.huatengvision.com/
HuaTeng Vision

http://www.huatengvision.com/
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

http://www.huatengvision.com/
HuaTeng Vision

http://www.huatengvision.com/

You might also like