Page 1 of 1

Identifying a sample part in a box

Posted: Mon Jan 14, 2019 4:14 pm
by LaGER
Hello,
I am trying to identify the type of components in a box (there is only one type of components in each box). I am using the point clouds of sample parts as a reference for each type. However, i have problems finding a "match" using the icp registration. The point clouds are roughly aligned since i use the same scanner for scanning the sample part and scanning the box. When using the segment option on the box with the components to seperate one component, the registration via icp works. When trying to use the point cloud of the whole box, i can't find a match. Is it possible to use another option which i am not aware of? Maybe im missing something obvious since i am a beginner using CloudCompare.

Greetings from Germany

Re: Identifying a sample part in a box

Posted: Sun Jan 20, 2019 8:04 pm
by Oiz
So, let me see if I understand you correctly before I can help you. A couple of questions:
  1. Correct me if I misunderstood, but yor process is as follows: You have this flat box with some "elements" visible from the outside; let's use as an example a cog or gear. You then first scan the box from the side with the gear visible, then you do a second scan of a gear with the same measurements as the one attached to the box.

    You then proceed to load both scans into CC, roughly align the scan of the gear so it's somewhat placed on the same spot as the gear in the box, and then you do ICP registration.

    Please let me know if that's the process or if I missed something.
  2. I imagine the scenario as, for example, a conveyor belt of a packaging machine with a 3D scanner attached on top and you want to identify the content of a passing and open cardboard box. In order to prepare the machine, you position one of the target components on the conveyor belt and scan it, somewhat forcing the kind of "pre-alignment" you talk about. The details of the scenario aren't what interest me, but my question rather is if the "constraints" applied to the scanned elements are similar in some way (objects facing in the same direction with respect to the scanner, roughly same distance to the scanner, similar scales, same scanner, etc)
  3. Lastly, can you elaborate more on your goal? I ask because it seems like the objective proposed on the tittle doesn't correspond too well with the process you're doing, if I understood it correctly. Roughly speaking, ICP registration is primarily used when you whant to improve the alignment of two scans of exactly the same object and expects primarily two things: i) that the scans are pretty much already aligned in translation, rotation and scale, and ii) that there is a significant and very roughly stimated and known overlap between the two scans (you can't, for example, align two scans that represent the opposite sides of an object with ICP, you need to "see" at least some of the same side on both scans, and the more, the better).

    All that to say, if your ultimate goal is to simply find a known object and don't want to deal with, or find impossible to comply with, the previous criteria, maybe some better options are:
    • If you can identify a prominent simple shape (a cylinder, box, cone, sphere, etc) in the target element, you can try to search with some RANSAC primitives, and the algorithm will try to find and align it for you.
    • If the shape is more complex, but differs wildly with the shape of the other target elements, maybe you can try to use CANUPO, which for our purposes work like RANSAC, but for arbitrary data that you have to teach it how its like. It's quite more involved, and requires reading its paper in order to really understand it.