[Constrained registration on Z-axis]

Hi There !
I’m student in Geomatic (Geography and Computer Science), I’m working on DTMs (Data Terrain Model) repositionning. I’ve a problem due to the following reason.

I have two Point Cloud Data. The first shows a depth map. The second shows a little disoriented section of depth map of the first point cloud. I try to do a registration of the second point cloud on the first. The algoritms that Open3D suggests correspond perfectly with I want to do, here I tried several functions whose “registration_ransac_based_on_feature_matching()”. The only one problem is the rotation in the transformation is done on the three axis (X, Y, Z), but I would to constrain the registration only with the translation and the rotation on the Z-axis.

To illustrate my problem, the first picture shows the first Point Cloud (blue colors), in red there is the disoriented section of depth map. And in white, it’s this registred section. We can see that this white section is slanted in comparison to the depth map. In the second picture, the transformation matrix I would like should look like this. Is someone knows the way to do this kind of registration ? Or an other possibility ?

Thanks in advance

Armand D.