Code Monkey home page Code Monkey logo

Comments (4)

mklingen avatar mklingen commented on July 23, 2024

These pictures (integrating chunks into a chunk map) visualize the problem, that the voxels nearby chunk borders doesn't get visited.

What? I don't understand how this mesh was created. Were you integrating a depth image? Was the depth camera moving?

from openchisel.

schnaubelt avatar schnaubelt commented on July 23, 2024

I basically get all the chunks (e.g. resolution 0.03m, chunk size 16^3) from a running chisel node. In this case it was a depth image from a fixed RBG-D camera.

This is the recorded scene:

base_scene

Then I insert all chunks into another chisel map (same resolution, different chunk size).
In order to do this, I compute for every voxel the new chunk- and voxel-id and update the corresponding voxel in the target chisel map.

Because every voxel still has the same position (resolution is unchanged), the resulting image should be complete again.

But be cause of the problem described in the first post, some IDs are invalid and therefore don't get overwritten.

from openchisel.

mklingen avatar mklingen commented on July 23, 2024

Then I insert all chunks into another chisel map (same resolution, different chunk size).
In order to do this, I compute for every voxel the new chunk- and voxel-id and update the corresponding voxel in the target chisel map.

When doing this kind of thing, its necessary to offset everything by half a voxel length. Otherwise, you get the rounding issues. A voxel begins at its minimum point and takes up all of the space to its maximum point. When you get the "coordinate" of a voxel, you are getting its minimum point, which is on the boundary of the voxel. By offsetting your queries by half a voxel length, you get the center of the voxel, and your rounding issues will go away.

Normally, when depth images/point clouds get projected into the voxel grid, the likelihood that they end up exactly on a boundary will be very low. But in your case, you are scanning through a voxel grid and re-inserting the values into a new voxel grid. When this happens, you're bound to get aliasing. Depending on the relative sizes of the chunks you're re-inserting into, you may need to do something like supersampling or interpolation. This is actually identical to the problems you might have resizing 2D images.

For this reason I don't recommend changing the units to millimeters or anything, because in the vast majority of use cases it isn't necessary.

from openchisel.

schnaubelt avatar schnaubelt commented on July 23, 2024

Thank you very much for your explanation!
I tested your suggestion and it works well.

Yes, I can already interpolate Chunks to handle such cases.

from openchisel.

Related Issues (20)

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.