helga-helga / stereo-vision Goto Github PK
View Code? Open in Web Editor NEWImplementation of algorithms for stereo vision
License: MIT License
Implementation of algorithms for stereo vision
License: MIT License
After diffusion is done, take the lightest vertex in each pixel: for each pixel (i, j)
find disparity value d
that gives the smallest value vertex_penalty_with_potentials(i, j, d)
. Minimum vertex weight for pixel is calculated in min_penalty_vertex()
function. This function can be used but should be updated to return not only a vertex weight min_penalty_vertex
, but also a disparity value d
.
Then draw a matrix which size match a size of an input image and has disparities as values:
pgm_handler
penalty_graph
crossing_out_graph
epsilon_search
diffusion
README.md
specifying how to generate documentation and write commentsA problem can be either in diffusion algorithm or in energy calculating. But zero-problem penalty is constant.
After a batch of diffusion iterations, do crossing out with provided epsilon. When a task becomes consistent (crossing out returns non-empty graph), stop diffusion iterations.
pgm_reader()
pgm_writer()
Allow edges only where
d(left) <= d(right) + 1
for all horizontal neighbors (left, right)
, where d(left)
is disparity of left pixel, d(right)
is disparity of right pixel
Try to use 1 iteration of the ICM algorithm after diffusion algorithm instead of crossing out, as another primal heuristic.
README.md
Zero disparity means that a pixel is infinitely far. It is the same as unknown distance.
TODO: create a separate penalty for zero disparity in lookup_table
Cover the next functions:
Big disparity means that two neighbor pixels are related to different objects.
For example, there is an object in the front of the wall. On the border between the object and the wall there will be a big disparity (consequently, a big penalty). And the far the wall is, the bigger is the penalty. It's normal situation, when objects has different distance from camera. But there is a big penalty for such a situation in a program.
TODO: If |d_1 - d_2| > c
, then fix the penalty, so that it won't be dependent on d_1
and d_2
,
where d_1
and d_2
are disparities of neighbor pixels and c
is some constant.
Will the problem be still sub-modular?
Remove code duplicates: zero_penalty()
and zero_one_penalty()
compute penalty of scecific disparity maps. penalty()
does the same. Just provide a disparity map to penalty()
and use it
Unused -- where vertex doesn't exist (if j >= d
doesn't take place)
penalty_graph
module and structure to diffusion_graph
diffusion
module to utils
moduleSave graph and iteration number to file and then load it
An error could occur after changes in edge_penalty_with_potential()
function (not all neighbors are used when calculating a penalty). Probably, the test should be updated.
---- penalty_graph::penalty_graph::test_penalty_four_pixels stdout ----
thread 'penalty_graph::penalty_graph::test_penalty_four_pixels' panicked at 'assertion failed: `(left == right)`
left: `4.0`,
right: `2.0`', src/penalty_graph.rs:393:9
Add tests for the next functions:
There is no test that checks if potentials are calculated correctly
.travis.yml
(https://crates.io/crates/cargo-tarpaulin)REAMDE.md
Add tests for the next functions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.