Surfacematching, PPF3DDetector Serialization


I startet using the Surfacematch modul, everything works fine. But training needs some time and i would like to save the training Data in a file. I tried to use serialization/deserializatin, but it does not work as i expected. Unfortunately the read() and write() functions are not implemented so i tried to do the serialization manually. My problem ist, that the Data i need (angle_step, hash_nodes…) are protected attributes and i have not found a method to get access to these attributes in order to serialize manually.

System Information:
Open CV Version: 4.8.1 (contrib)
Operation System: Win 10 64bit

detector_0 = cv.ppf_match_3d_PPF3DDetector(samplingstep, distancestep, numAngles)
pc_0 = cv.ppf_match_3d.loadPLYSimple(myfile, 1)
#now get access to detector_0 attributes somehow

Is there a way to get access to the protected attributes somehow in order to use pickle or FileStorage to serialize/deserialize the data?

Thank you in advance.

Could you please try this through subclassing or inheritance to create methods that allow you to indirect access to these attributes. Because accessing protected attributes in cv.ppf_match_3d_PPF3DDetector. It might not be possible for serialization due to encapsulation or protected nature.
What do you think?

unfortunately, there is no code to serialize the ppf detector after training ;(
(it’s not a python api problem)