2

I'm using HALCON to do 3D application, currently, I use xyz_to_object_model_3d to create 3D model, and the Z image is from 3D sensor. the item in reality looks like: Modle picture1

but the 3D model in HALCON looks like: 3D model in HALCON

there seems gap between 2 planes of this model, any operator in HALCON to fix this gap? Thanks.

Tommy
  • 31
  • 1

1 Answers1

1

It is not 100% clear if you're looking for a solution to automatically correct any offset between both planes or do it manually.

If there is no angular deviation between both planes, i.e. they are parallel, the easiest way to solve your problem is to apply an offset to the z-coordinates of your object model.

I would apply this offset correction after creating the object model by performing a lateral translation:

hom_mat3d_identity(HomMat3D)
hom_mat3d_translate(HomMat3D, 0, 0, 42, HomMat3DTranslate)
affine_trans_object_model_3d(ObjectModel3D, HomMat3DTranslate, ObjectModel3DAffineTrans)

The automatic approach would include using the procedure register_object_model_3d_pair(). To take advantage of this you need to seperate the points of both planes you want to fit. You could do this by taking advantage of the procedure select_points_object_model_3d() where you would like so select a volume of space by limiting the z range to e.g. +- 1 unit.

d10e
  • 56
  • 7
  • Actually, I'm a newer of HALCON 3D application, now I got some idea about it. As you know, HALCON use xyz image to create 3D model, there will be invalid value such as 0 for some pixels in Z image, and I will cause gap in 3D model. I use the operator named "inpainting_aniso" to fix the 0s in Z image, then the gap in 3D model should be less or gone totally. Thanks. – Tommy Jul 20 '17 at 12:06