Giter VIP home page Giter VIP logo

stereodepth's Introduction

Welcome!

👨‍💻  About Me :

  • 🔭 I am an iOS Developer with Embedded Systems and Computer Vision background. I have 4 years of experience in the industry and I worked with Fortune 500 clients in different industries such as robotics, autonomous cars, computer simulation, streaming, and automation.
  • 🎓 I graduated in 2018 from Gebze Technical University BSc in Computer Engineering. I'm the founder of the Computer Society and I worked as a tutor for C/C++, and event organizer by conducting events like GeekDay.
  • 🎸 I play guitar and I also have interest and experience in Mixing/Mastering and Composing for Progressive Metal/Djent and Lo-Fi genres. I have 2 albums and many singles, you can find me on every platform. Follow my musical journey!
  • 📫 How to reach me:   Linkedin Badge

🛠  Languages and Tools :

            Flutter       


GitHub Streak

Top Langs

GitHub Stats


✍️ Blog Posts :

stereodepth's People

Contributors

aliyasineser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stereodepth's Issues

I getting only a fully white color in depth screen

I done all step for stereo calibration but I getting a just a white screen then I tried your stereo calibration file it's working it showing some depth but it's not going to be correct depth because I am using different from your camera (two c270 camera).

this is my stereo file
%YAML:1.0

K1: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 8.9097802803323373e+02, 0., 3.0006642964743565e+02, 0.,
9.2593842191950148e+02, 7.8165024820505010e+01, 0., 0., 1. ]
D1: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [ 4.5571307763078717e-01, -2.1371653403804274e+00,
-1.0600088198594815e-01, -4.1709276363259854e-03,
7.6138794069241875e+00 ]
K2: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 8.8097737167946809e+02, 0., 3.3341133238820430e+02, 0.,
9.1397906735611662e+02, 1.0851476284668595e+02, 0., 0., 1. ]
D2: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [ 9.2906895358031608e-02, 1.0129152698060886e+00,
-9.5093716749191579e-02, 4.5423297986634187e-03,
-2.3420055234373098e+00 ]
R: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 9.9981362129215290e-01, -1.7125721991468577e-02,
-8.9124814132944419e-03, 1.6998282631813209e-02,
9.9975491330655863e-01, -1.4183501223761859e-02,
9.1531997815183005e-03, 1.4029360843117065e-02,
9.9985968814033765e-01 ]
T: !!opencv-matrix
rows: 3
cols: 1
dt: d
data: [ 1.0577134040602316e-01, 1.4328375860577982e-03,
-1.1656850572458893e-02 ]
E: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 2.1126148930712530e-04, 1.1674095429020535e-02,
1.2673015875918243e-03, -1.2622824193606941e-02,
-1.2842723192162449e-03, -1.0565260796848723e-01,
3.6536060292735226e-04, 1.0576995563609995e-01,
-1.4874377977337520e-03 ]
F: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 1.9124993696215748e-07, 1.0169253916597929e-05,
1.6991364161982508e-04, -1.1014530791674363e-05,
-1.0783294803252525e-06, -7.8750996918197716e-02,
1.4228594622010579e-03, 7.7895980868225079e-02, 1. ]
R1: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ -9.9293279311101512e-01, 5.0973054514407415e-03,
1.1856848587163883e-01, -4.2910791113344423e-03,
-9.9996591349316033e-01, 7.0539699354129530e-03,
1.1860040052554023e-01, 6.4953313175043813e-03,
9.9292082044151808e-01 ]
R2: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ -9.9389176604265628e-01, -1.3463812346450965e-02,
1.0953484901943035e-01, 1.2771990513931762e-02,
-9.9989382612060951e-01, -7.0151795558210583e-03,
1.0961767034069771e-01, -5.5733511452202037e-03,
9.9395820038173144e-01 ]
P1: !!opencv-matrix
rows: 3
cols: 4
dt: d
data: [ 3.7013994770355175e+01, 0., 6.1154418468475342e+01, 0., 0.,
3.7013994770355175e+01, 5.5961920452117920e+02, 0., 0., 0., 1.,
0. ]
P2: !!opencv-matrix
rows: 3
cols: 4
dt: d
data: [ 3.7013994770355175e+01, 0., 6.1154418468475342e+01,
-3.9390806669324721e+00, 0., 3.7013994770355175e+01,
5.5961920452117920e+02, 0., 0., 0., 1., 0. ]
Q: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1., 0., 0., -6.1154418468475342e+01, 0., 1., 0.,
-5.5961920452117920e+02, 0., 0., 0., 3.7013994770355175e+01, 0.,
0., 9.3966074574399450e+00, 0. ]

square_size 0.025 m 9 6 chessboard

what I missed

thanks

Redundant calculation of initUndistortRectifyMap ?

In stereo_depth.py 's Undistortion and Rectification part

leftMapX, leftMapY = cv2.initUndistortRectifyMap(K1, D1, R1, P1, (width, height), cv2.CV_32FC1)
left_rectified = cv2.remap(leftFrame, leftMapX, leftMapY, cv2.INTER_LINEAR, cv2.BORDER_CONSTANT)
rightMapX, rightMapY = cv2.initUndistortRectifyMap(K2, D2, R2, P2, (width, height), cv2.CV_32FC1)
right_rectified = cv2.remap(rightFrame, rightMapX, rightMapY, cv2.INTER_LINEAR, cv2.BORDER_CONSTANT)

I think it is not needed to initUndistortRectifyMap for every frame. It could have been done just for the first frame. is my understanding correct ?

-- Thank you,
Balaji

how to use

Single camera calibration
python single_camera_calibration.py --image_dir data\leftFixedStereo --image_format png --prefix left --square_size 0.025 --width 9 --height 6 --save_file left_cam.yml
python single_camera_calibration.py --image_dir data\rightFixedStereo --image_format png --prefix right --square_size 0.025 --width 9 --height 6 --save_file right_cam.yml

Stereo camera calibration
python stereo_camera_calibration.py --left_file left_cam.yml --right_file right_cam.yml --left_prefix left --right_prefix right --left_dir data\bothImagesFixedStereo --right_dir data\bothImagesFixedStereo --image_format png --square_size 0.025 --save_file stereo_cam.yml

Disparity map
python stereo_depth.py --calibration_file stereo_cam.yml --left_source data\left_1541067450.avi --right_source data\right_1541067450.avi --is_real_time 0

use default data/* yml

Stereo camera calibration
python stereo_camera_calibration.py --left_file data\left_cam.yml --right_file data\right_cam.yml --left_prefix left --right_prefix right --left_dir data\bothImagesFixedStereo --right_dir data\bothImagesFixedStereo --image_format png --square_size 0.025 --save_file stereo_cam.yml

Disparity map
python stereo_depth.py --calibration_file data\stereo_cam.yml --left_source data\left_1541067450.avi --right_source data\right_1541067450.avi --is_real_time 0

[maybe a bug] about the image_size

In stereo_camera_calibration.py line: 103
image_size = gray_right.shape
I think it should be changed like this:
image_size = gray_right.shape[::-1]

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.