Comments (1)
You are on the correct path; however, there are other steps necessary to compute the IMAGE coordinates of VP3. See the functions bellow.
def getFocal(vp1, vp2, pp):
return math.sqrt(- np.dot(vp1[0:2]-pp[0:2], vp2[0:2]-pp[0:2]))
def homogenizeAndNormalize(p):
p = np.array(p)
p = p.flatten()
assert len(p) == 2 or len(p) == 3
if len(p) == 2:
return np.concatenate((p, [1]))
else:
return p/p[2]
"""
Compute camera calibration from two van points and principal point
"""
def computeCameraCalibration(_vp1, _vp2, _pp):
vp1 = homogenizeAndNormalize(_vp1)
vp2 = homogenizeAndNormalize(_vp2)
pp = homogenizeAndNormalize(_pp)
focal = getFocal(vp1, vp2, pp)
vp1W = np.concatenate((vp1[0:2], [focal]))
vp2W = np.concatenate((vp2[0:2], [focal]))
ppW = np.concatenate((pp[0:2], [0]))
vp3W = np.cross(vp1W-ppW, vp2W-ppW)
vp3 = np.concatenate((vp3W[0:2]/vp3W[2]*focal + ppW[0:2], [1]))
vp3Direction = np.concatenate((vp3[0:2], [focal]))-ppW
roadPlane = np.concatenate((vp3Direction/np.linalg.norm(vp3Direction), [10]))
return vp1, vp2, vp3, pp, roadPlane, focal
from boxcars.
Related Issues (20)
- Bounding Box Estimator HOT 1
- this command error : python3 scripts/train_eval.py --eval path-to-model.h5 HOT 3
- Help in understanding dataset.pkl HOT 3
- No such file :dataset.pkl HOT 1
- AttributeError: 'NoneType' object has no attribute 'TF_DeleteStatus' HOT 1
- Where to find the NET that estimates 3D bb ? HOT 2
- Use trained model for single image prediction HOT 3
- BCNN, CBL and PCM are all using VGGNet as baselines, but achieve worse performance
- This is just a car patch classification example HOT 4
- Training on Custom data
- Is there any full image corresponding to the patch
- Link to dataset is down HOT 13
- Confusion of contour detection
- How to create the pickle files for my own dataset?
- Link to trained model is down
- requirements.txt file
- Dataset link is down HOT 2
- Trained Model fails in evaluation and single image classification HOT 1
- list of 107 classes from model
- lots of wrong labeled images in the training boxcars116k dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxcars.