Base on Opencv3 and Aruco, Use in Qt.
With 3 Cpps
main.cpp
is Calibration main Cppdrawcharucoboard.cpp
as the name, generate the ChArucoBoardtestvideocapture.cpp
test the video file is Recognized by Opencv3mutexvideocapture.cpp
base ontestvideocapture.cpp
, but letVideoCapture.read()
run in another thread, which can increase the video FPS. reference: increasing-webcam-fps-with-python-and-opencv
you can modify the Calibration.pro
to Build and Run.
References:
From the reference, can get Source code from here
Because with Qt, the Qt Pro file is:
QT += core
QT -= gui
CONFIG += c++11
TARGET = new_camera_Calibration
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += .
INCLUDEPATH += /usr/local/include/
LIBS += -L/usr/local/lib/ -I/usr/local/include -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_aruco -lopencv_imgcodecs -lopencv_calib3d -lopencv_videoio
TEMPLATE = app
SOURCES += \
drawcharucoboard.cpp
DEFINES += QT_DEPRECATED_WARNINGS
and with Qt Creator 4.2, in the left side, choose Project->Run Setting-> Command line arguments, input this:
-w=7 -h=5 -sl=80 -ml=70 -d=11 -bb=1 -si=true /home/nimo/NewCamera/Temp/0601.png
Then, run the source code, you can get a Board.
And then, you can use your camera to take a video, the content is the ChArucoBoard what is generate in first part.
Use Python Code to Get avi, I dont know the reason why the Opencv3 could not recognize the video which I get from AMCap. And then, use the Source Code here
and here is the Args:
-w=7 -h=5 -sl=80 -ml=70 -d=11 -sc=true -v=/home/nimo/Videos/NewCamera/calibration.avi /home/nimo/NewCamera/Calibration.txt