Geometry of Stereo Vision explained
In this video, I explain the geometry of stereo Vision. Please have look at my other tutorial about finding the essential and fundamental matrix.
Geometry of Stereo Vision explained Read More »
In this video, I explain the geometry of stereo Vision. Please have look at my other tutorial about finding the essential and fundamental matrix.
Geometry of Stereo Vision explained Read More »
What is the relation between the size of an object and its projection in camera fame? In this video, I explain how far you should stay from an object to see it at your desired size at camera frame </
The relation between the size of an object and its projection in camera fame Read More »
In this tutorial, I explain the vanishing points in computer vision.
Vanishing points in computer vision explained Read More »
The equation of Line and plane in 3D Space:
Equation of Line and Plane in 3D Space Explained Read More »
There are two main methods for developing GUI application with qt: 1) Adding all widgets in your code (your cpp or python code) 2) Creating qt UI files, adding widgets there and load everything into your application. 1)Adding all widgets in your code Here is the snippet for adding all widgets and their slots in code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import sys print(sys.version) import warnings warnings.filterwarnings('ignore') from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QSlider from PyQt5.QtCore import QSize, Qt, pyqtSlot,pyqtSignal class HelloWindow(QMainWindow): pushButtonClicked = pyqtSignal() valueUpdating = pyqtSignal(int) def pushButtonClicked(self): self.title.setText("PyQt updated!") def valueUpdating(self, value): self.title.setText(str(value)) def __init__(self): QMainWindow.__init__(self) self.setMinimumSize(QSize(640, 480)) self.setWindowTitle("Hello world") self.title = QLabel("PyQt!", self) self.title.setAlignment(QtCore.Qt.AlignCenter) self.pushButton = QtWidgets.QPushButton(self) self.pushButton.setGeometry(QtCore.QRect(140, 200, 99, 27))#x,y, width, height self.pushButton.setObjectName("pushButton") self.pushButton.setText("Click Me!") self.pushButton.clicked.connect(self.pushButtonClicked) self.slider = QtWidgets.QSlider(self) self.slider.setGeometry(QtCore.QRect(100, 20, 100, 30)) self.slider.setFocusPolicy(Qt.StrongFocus) self.slider.setTickPosition(QSlider.TicksBothSides) self.slider.setSingleStep(1) self.slider.setPageStep(1) self.slider.setMaximum(100) self.slider.setMinimum(0) self.slider.setOrientation(Qt.Horizontal) self.slider.valueChanged.connect(self.valueUpdating) if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) mainWin = HelloWindow() mainWin.show() sys.exit( app.exec_() ) |
2)
How to develop GUI Application with PyQt (python Qt) Read More »
Clang format and code beautifier for Qt Creator Different developers use different styles with different IDE (i.e some people use space, some use tab) which may cause lots of changes in your git repository. One solution to this is to use some standard code formatting and beautifier. clang is a great tool for this purpose
Clang format and code beautifier for Qt Creator Read More »
Forking Projects You can “fork” the project if you want to contribute to an existing project to which you do not have push access. GitHub can make a copy of the project that is fully yours when you “fork” a project; it resides in your namespace, and you can push it. By creating what is
Everything you need to know to master git, Part 10, git fork Read More »
Set up: This allows the repository to be local a file directory:
1 2 3 |
ROOT=/tmp echo $ROOT git config --global protocol.file.allow always |
Create remote:
1 2 3 |
cd $ROOT mkdir remote git init --bare remote |
Creating repos1
1 2 3 4 5 6 7 8 9 10 |
mkdir repos1 cd $ROOT/repos1 git init touch main.cpp git add . git commit -m 'main.cpp added' git remote add origin ../remote/ git push --set-upstream origin master git push origin master |
Creating lib1
1 2 3 4 5 6 7 8 9 10 |
cd $ROOT mkdir lib1 cd $ROOT/lib1 git init . touch vision.hpp git add . git commit -m 'vision.hpp added' # this alows to push into this repository, as it is a non-bare repository git config --local receive.denyCurrentBranch updateInstead |
Adding lib1 as submodule to repos1
1 2 3 4 5 6 7 8 9 10 11 12 13 |
cd $ROOT/repos1 git submodule add ../lib1/ git diff --cached lib1/ # This command lists the submodules recorded in the .gitmodules file along with their current checked out commit. git submodule # Gives you the commit from repose lib1 that has been added git ls-tree master git add . git commit -m 'lib1 as submodule added' git push origin master |
Cloning a Project with Submodules to repos2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
cd $ROOT mkdir $ROOT/repos2 cd $ROOT/repos2 git clone $ROOT/remote/ . git submodule init git submodule update # Simpler way: # git clone --recurse-submodules ../remote/ . #If you already cloned the project and forgot --recurse-submodules, you can combine the git submodule init and git submodule update # We are in Detached HEAD State cd $ROOT/repos2/lib1/ git checkout master git branch -vv |
Working on Submodule lib1 in repos2:
1 2 3 4 5 6 7 8 |
cd $ROOT/repos2/lib1/ touch reader.hpp git add . git commit -m 'reader added from repos2' cd ../ git add . git commit -m 'submodule lib1 updated' git push |
Pulling in Upstream Changes from the Submodule Remote in repos1:
1 2 3 4 5 6 7 8 9 |
cd $ROOT/repos1/lib1 git fetch git merge now cd ../ git diff --submodule # There is an easier way to do this git submodule update --remote |
Mastering git, Part 9, git Submodule Read More »
A git hook is a script that Git executes before or after an event such as committing, pushing, or receiving code. Git hooks are a built-in feature of Git that allows you to perform custom actions at specific points in the Git workflow. They are stored in the .git/hooks directory in a Git repository, and
Mastering git, Part 8, git Hook Read More »
1. Creating a branch It quite often happens that a software product is on a git server and developers add new features to the product. To make the job easier, developers usually create branches beside the master branch (which is the default branch) and work on their branch and once the changes are confirmed and
Mastering git, Part 7, git branch and tag Read More »