Giter Site home page Giter Site logo

camera-claibration-opencv-python's Introduction

Camera Claibration opencv

This script uses 9*6 checkerboard to generate calibration data and saves it using pickle so that it can be used to calibrate the camera. It also displays your calibrated images at the end This script uses live feed to detect corners.

  • Change value of "checkorBoardSize" to your checkerboard size
  • Change value of "dump_loc" to change the location where you save your calibration data
  • To change the number of images used to complete calibration change "calibrationImagesNo"
  • It is recommended that you use more than 50 images for calibration
  • Linux users need to make a small change in the beggining of the code please check the comments

Please use idle to run this code it might not run using direct cmd prompt

How to use

  • Run script select correct option
  • The camera should start and display the image in a window
  • Stand infront of the camera with checkerboard
  • If the board is detected frame will freeze for a few seconds and will play a sound
  • Do this on all sides of the frame
  • Repeat the no of times that you selected
  • When the calibration is done a new window will appear with the corrected frame
  • The parameters will be saved using pickle on the desktop or the place where you selected

Requirments:

  • Python-OpenCV(I tested it on CV2 version 3.4.x i havent tested it with cv2 version 4.0.x)
  • Numpy
  • Pickle

Note: pip installations should work here no need to compile from source

Note:If you aren't getting good results then play with the flags in:

[ln 135] ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1],None,None,flags=cv2.CALIB_USE_EXTRINSIC_GUESS+cv2.CALIB_FIX_K3)

depending upon the type of error you may need to use a different combination of flags

camera-claibration-opencv-python's People

Contributors

zarar7576 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.