FangGet / BundleFusion_Ubuntu_Pangolin

a porting for BundleFusion working on ubuntu, with Pangolin as visualizer
Other
124 stars 33 forks source link

Failed to save mesh #2

Closed bryce-wang-315 closed 4 years ago

bryce-wang-315 commented 4 years ago

After I finished all the images data, then I clik the "saveMesh" button on the pangolin window, but I encounter the follow problem " [1] + Done "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-knhbzn1w.k1l" 1>"/tmp/Microsoft-MIEngine-Out-52ts0jac.tk7" ". I don't know why, even though I test the official dataset, I would face this problem. Is there anybody who faced the same problem with me? If you did, please give me some suggestions.

bryce-wang-315 commented 4 years ago

if I operate it from terminal, I will get the "Segmentation fault (core dumped)" error

FangGet commented 4 years ago

I will check that

FangGet commented 4 years ago

@bryce-wang-315 For my experience, "Segmentation fault" always relate to gpu memory lack. For save mesh function, please give a screenshot for your terminal output.

bryce-wang-315 commented 4 years ago

Thank you very much, I have solved this problem, and I found that the reason is that mybe we have different g++ version. I changed this function bellow. I changed the second level "for circle", and then it works. template unsigned int MeshData::removeDegeneratedFaces() { Indices newFacesIndicesVertices; for (size_t i = 0; i < m_FaceIndicesVertices.size(); i++) { std::unordered_set _set(m_FaceIndicesVertices[i].size()); bool foundDuplicate = false; // for (auto idx : m_FaceIndicesVertices[i]) { for (int j = 0; j < m_FaceIndicesVertices[i].size(); ++j) {

        auto idx = m_FaceIndicesVertices[i][j];
        if (_set.find(idx) != _set.end()) {
            foundDuplicate = true;
            break;
        } else {
            _set.insert(idx);
        }
    }

    if (!foundDuplicate) {
        newFacesIndicesVertices.push_back(m_FaceIndicesVertices[i]);
    }
}
if (m_FaceIndicesVertices.size() != newFacesIndicesVertices.size()) {
    m_FaceIndicesVertices = newFacesIndicesVertices;
}

return (unsigned int)m_FaceIndicesVertices.size();

}

FangGet commented 4 years ago

glad to hear that.

Uncle-Justice commented 3 years ago

I didn't got this error but when i opened the mesh model in meshlab, it throws a warning about degenerated faces. I followed the code changes above and got no meshlab's warnings any more. Also, I found some colored noise in some border disappeared.