Coherent-Point-Drift-Python icon indicating copy to clipboard operation
Coherent-Point-Drift-Python copied to clipboard

Using STL files with CPD registration

Open stevenagl12 opened this issue 6 years ago • 4 comments

Is there a way to use STL files to perform the rigid and non-rigid registration?

stevenagl12 avatar Aug 03 '19 02:08 stevenagl12

The methods don't limit what kind of original files you are using. It needs numpy ndarray as input, so probably check some python libraries to help you to load the STL files. I did a quick search (didn't test), numpy-stl looks like something you need.

yanbo-huang avatar Aug 06 '19 11:08 yanbo-huang

@stevenagl12 did you try it? Any good news?

yanbo-huang avatar Aug 09 '19 09:08 yanbo-huang

I'm working on trying it, but the PyPl website for numpy-stl doesnt really have good code for how to access the vertices themselves from a model. Only how to import the full model or build a model. I'm hoping there's an easier way than importing the file, parsing it for all the vertices, then putting them into a mesh like it seems.

On Fri, Aug 9, 2019, 05:31 Yanbo [email protected] wrote:

@stevenagl12 https://github.com/stevenagl12 did you try it? Any good news?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Hennrik/Coherent-Point-Drift-Python/issues/2?email_source=notifications&email_token=AHHKCLMC2NDMTDB3TY5OANTQDU2PFA5CNFSM4IJB7XNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD36E5XQ#issuecomment-519851742, or mute the thread https://github.com/notifications/unsubscribe-auth/AHHKCLL2KEGOWNZKPTCM2M3QDU2PFANCNFSM4IJB7XNA .

stevenagl12 avatar Aug 09 '19 10:08 stevenagl12

I tried it using trimesh to import the meshes and it is failing. Rigid registration according to your code appears to require the same number of points between both meshes? In addition, I have mesh vertices with (138334, 3) & (154682, 3) dimensions, so when I run the nonrigid registration it is giving me: MemoryError: Unable to allocate array with shape (154682, 154682, 3) and data type float64. Is the memory error because of too little ram?

On Fri, Aug 9, 2019 at 5:59 AM Steven Lewis [email protected] wrote:

I'm working on trying it, but the PyPl website for numpy-stl doesnt really have good code for how to access the vertices themselves from a model. Only how to import the full model or build a model. I'm hoping there's an easier way than importing the file, parsing it for all the vertices, then putting them into a mesh like it seems.

On Fri, Aug 9, 2019, 05:31 Yanbo [email protected] wrote:

@stevenagl12 https://github.com/stevenagl12 did you try it? Any good news?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Hennrik/Coherent-Point-Drift-Python/issues/2?email_source=notifications&email_token=AHHKCLMC2NDMTDB3TY5OANTQDU2PFA5CNFSM4IJB7XNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD36E5XQ#issuecomment-519851742, or mute the thread https://github.com/notifications/unsubscribe-auth/AHHKCLL2KEGOWNZKPTCM2M3QDU2PFANCNFSM4IJB7XNA .

-- Sincerely,

Steven A. Lewis

stevenagl12 avatar Aug 10 '19 15:08 stevenagl12