All Projects → Abhijit-2592 → Camera_calibration_api

Abhijit-2592 / Camera_calibration_api

Licence: apache-2.0
A simple Python API for single camera calibration using opencv

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects
matlab
3953 projects
python2
120 projects

Projects that are alternatives of or similar to Camera calibration api

Sltk
An OpenCV-based structured light processing toolkit.
Stars: ✭ 151 (+319.44%)
Mutual labels:  camera, camera-calibration, opencv
Handeye calib camodocal
Easy to use and accurate hand eye calibration which has been working reliably for years (2016-present) with kinect, kinectv2, rgbd cameras, optical trackers, and several robots including the ur5 and kuka iiwa.
Stars: ✭ 364 (+911.11%)
Mutual labels:  camera, camera-calibration
Grip
Program for rapidly developing computer vision applications
Stars: ✭ 314 (+772.22%)
Mutual labels:  camera, opencv
React Native Vision Camera
📸 The Camera library that sees the vision.
Stars: ✭ 443 (+1130.56%)
Mutual labels:  api, camera
Bmw Yolov4 Inference Api Cpu
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.
Stars: ✭ 180 (+400%)
Mutual labels:  api, opencv
Camerafragment
A simple easy-to-integrate Camera Fragment for Android
Stars: ✭ 2,312 (+6322.22%)
Mutual labels:  api, camera
React Native Openalpr
An open-source React Native automatic license plate recognition package for OpenALPR
Stars: ✭ 415 (+1052.78%)
Mutual labels:  camera, opencv
Live Video Magnification
An OpenCV/Qt based realtime application for Eulerian Video Magnification / Motion Magnification. Works with multiple videos and cameras at the same time and let's you export the magnified videos.
Stars: ✭ 187 (+419.44%)
Mutual labels:  camera, opencv
3dv tutorial
An Invitation to 3D Vision: A Tutorial for Everyone
Stars: ✭ 571 (+1486.11%)
Mutual labels:  camera-calibration, opencv
Lidar camera calibration
ROS package to find a rigid-body transformation between a LiDAR and a camera for "LiDAR-Camera Calibration using 3D-3D Point correspondences"
Stars: ✭ 734 (+1938.89%)
Mutual labels:  camera, camera-calibration
V4l2loopback cpp
v4l2loopback usage in C++ and from OpenCV
Stars: ✭ 6 (-83.33%)
Mutual labels:  camera, opencv
Blinkpy
A Python library for the Blink Camera system
Stars: ✭ 174 (+383.33%)
Mutual labels:  api, camera
React Native Opencv Tutorial
👩‍🏫Fully working example of the OpenCV library used together with React Native
Stars: ✭ 244 (+577.78%)
Mutual labels:  camera, opencv
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (+622.22%)
Mutual labels:  api, opencv
Primestereomatch
A heterogeneous and fully parallel stereo matching algorithm for depth estimation, implementing a local adaptive support weight (ADSW) Guided Image Filter (GIF) cost aggregation stage. Developed in both C++ and OpenCL.
Stars: ✭ 191 (+430.56%)
Mutual labels:  camera, opencv
Stereo Calibration
📷 📷 Stereo camera calibration using OpenCV and C++
Stars: ✭ 376 (+944.44%)
Mutual labels:  camera-calibration, opencv
Multi Threading Camera Stream
Multi-threading camera stream to improve video processing performance
Stars: ✭ 18 (-50%)
Mutual labels:  camera, opencv
Stereo Vision
This program has been developed as part of a project at the University of Karlsruhe in Germany. The final purpose of the algorithm is to measure the distance to an object by combining two webcams and use them as a Stereo Camera.
Stars: ✭ 160 (+344.44%)
Mutual labels:  camera, opencv
Neuvision
Structured Light based 3D scanner
Stars: ✭ 165 (+358.33%)
Mutual labels:  camera, opencv
Scanner
二维码/条码识别、身份证识别、银行卡识别、车牌识别、图片文字识别、黄图识别、驾驶证(驾照)识别
Stars: ✭ 547 (+1419.44%)
Mutual labels:  camera, opencv

camera_calibration_API

A repository containing the camera calibration API

Repository Overview:

camera_calibration.py:contains an API which tries to minic the MATLAB's camera calibration app functionality. This API is a thin wrapper around the opencv's camera calibration functionalities.

examples: A directory containing various examples

Camera_Calibration_API:

Introduction:

The Camera Calibration API is a wrapper around the opencv's camera calibration functionalities. This tries to mimic the MATLAB camera calibration app's functionality in python. The API supports all the 3 calibration patterns supported by opencv namely: Chessboards, Asymmetric circular grids and Symmetric circular grids. The API by default runs on 4 threads for speedup. The speed-up may not be marginal in the case of chessboard calibration because in most cases the bottle neck will be a single chessboard image (run on a single core) which the algorithm takes time to detect.

Dependencies:

  • works in both python-3 and python-2
  • opencv (Tested in version 3.3.0)
  • numpy
  • matplotlib
  • pickle
  • argparse
  • glob
  • pickle
  • multiprocessing
  • os
  • pandas

Example:

Examples to use the Camera_Calibration_API() for calibration using chessboard, symmetric circular grids and asymmetric circular grids can be found in the example_notebooks folder

Features:

  • Supports all the 3 calibration patterns supported by opencv : Chessboards, Asymmetric circular grids and Symmetric circular grids.
  • Additionally a custom calibration pattern can also be implemented. (Look at the next section for how to calibrate using custom pattern.)
  • Visualizes the Reprojection error plot
  • Ability to Recalibrate the camera by neglecting the images with very high reprojection errors.
  • Camera centric and Pattern centric views can be visualized using the visualize_calibration_boards method after calibration.
  • Blob detection parameters for detecting asymmetric and symmetric circular grids can be accessed and modified via the Camera_Calibration_API's object prior to calling the calibrate_camera method
  • Also has terminal support with minimal control on the variables. Use it as an importable module for better control over the variables
  • Can also be easily extended to support other unimplemented calibration patterns

Using custom calibration board with the Camera_Calibration_API.

So you want to extend the API for a custom calibration pattern? Well... OK! Just follow the follow the steps below

  • The calibrate_camera accepts two additional arguments called custom_world_points_function and custom_image_points_function.
  • You must implement the above two custom methods and pass it as an argument to the calibrate_camera method
custom_world_points_function(pattern_rows,pattern_columns):
  • This function is responsible for calculating the 3-D world points of the given custom calibration pattern.
  • Should take in two keyword arguments in the following order: Number of rows in pattern(int), Number of columns in pattern(int)
  • Must return only a single numpy array of shape (M,3) and type np.float32 or np.float64 with M being the number of control points of the custom calibration pattern. The last column of the array (z axis) should be an array of 0
  • The distance_in_world_units is not multiplied in this case. Hence, account for that inside the function before returning
  • The world points must be ordered in this specific order : row by row, left to right in every row
custom_image_points_function(img,pattern_rows,pattern_columns):
  • This function is responsible for finding the 2-D image points from the custom calibration image.
  • Should take in 3 keyword arguments in the following order: image(numpy array),Number of rows in pattern(int), Number of columns in pattern(int)
  • This must return 2 variables: return_value, image_points
  • The first one is a boolean Representing whether all the control points in the calibration images are found
  • The second one is a numpy array of shape (N,2) of type np.float32 containing the pixel coordinates or the image points of the control points. where N is the number of control points.
  • This function should return True only if all the control points are detected (M = N)
  • If all the control points are not detected, fillup the 2-D numpy array with 0s entirely and return with bool == False.
  • The custom image points must be ordered in this specific order: : row by row, left to right in every row

NOTE: 'Custom' pattern is not supported when accessed from terminal

Supported Calibration patterns (rows x columns) bydefault:

Chessboard or Checkerboard pattern (6 x 9):

chessboard

Asymmetrical circular grid/pattern (4 x 11):

Asymmetric circular grid.

NOTE for calibrating using Asymmetric circular grid:

  • The code assumes that each asymmetric circle is placed at half the distance_in_world_units in both (x,y) from each other.

  • The distance_in_world_units is specified as the distance between 2 adjacent circle centers at the same y coordinate

  • The above is a 4 x 11 (r x c) asymmetrical circular grid.

  • If you are using the same orientation as the above, Then this orientation is termed as double_count_in_column which is by default set to True.

  • If you are using an orientation which is 90deg to the above orientation 11 x 4 (r x c) then the double count is along the rows. In this case, set object.double_count_in_column = False prior to calling object.calibrate_camera method.

Symmetric circular grid/pattern (7 x 6):

Symmetrical circular pattern

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].