Comments (5)
This is how I've been doing this:
Assume your data contains an image with width W, height H, focal lengths fx, fy.
Demon assumptions: width 256, height 192, (normalized) focal lengths 0.89115971, 1.18821287.
We can find the crop dimensions H' x W' from the relationship between focal length and image dimensions:
(0.89115971)(256) = (fx)(W')
(1.18821287)(192) = (fy)(H')
Make sure you normalize your fx, fy values (e.g., fx_norm = fx / W).
You can then resize this cropped image to the required 192 x 256 dimensions.
Best,
Sam
from demon.
@rnunziata @sampepose I have a question. After getting the crop dimension H' and W', I am wondering from which side of the original image should I crop this new one. And what if the object that I want to calculate distance to is lost after cropping?
Thanks.
from demon.
You can crop anywhere in the image (center crop, random crop, whatever). Crop so the object is still in the image.
from demon.
Thanks !!
from demon.
The normalized intrinsic parameters we trained DeMoN on are
K = (0.89115971 0 0.5)
(0 1.18821287 0.5)
(0 0 1 )
To adjust the focal length of your image, you scale the image such that the normalized focal lengths for the x and y dimension match (0.8911 and 1.1882). This is what @sampepose described in the second comment.
The principal point is exactly in the image center (0.5, 0.5). This means you should crop with this point as the center.
I hope this helps.
from demon.
Related Issues (20)
- AttributeError: module 'lmbspecialops' has no attribute 'leaky_relu' HOT 2
- Train error (different shapes) HOT 2
- lmbspecialops make error HOT 5
- Not loading created datasets HOT 1
- Cant install 'minieigen' HOT 2
- make error tensorflow/correlation/op.h
- create dataset HOT 1
- question about training datasets
- undefined symbol: _ZN10tensorflow7strings6StrCatERKNS0_8AlphaNumES3_S3_S3_ HOT 2
- make error:has no member named ‘starts_with’ HOT 2
- documentation for generating "depthTSDF" folder
- Error importing lmbspecialops HOT 1
- Sample for google colab notebook HOT 1
- Bad accuracy at black/white images HOT 2
- Performance issues in the program HOT 1
- Performance issues in /examples/evaluation.py (by P3) HOT 1
- scaleinvariantgradient_cuda.cu - cannot compile
- the minus values depth map gt
- pytorch implementation
- Scenes11 dataset
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 demon.