How to generate calibrationParameters.yml for pointcloud.cpp file?

In opencv , I read a few camera clibration .cpp files , and projector calibration .cpp files , and their calibration results are different ( probably because of different image_size , square_size , and so on ) .
Can someone tell me , which .cpp file in Opencv , or a website link , can generate the calibrationParameters.yml file , for the pointcloud.cpp file ( here … structured_light/samples/pointcloud.cpp )
Thank for your reply very very much !!!

what cameras are you using? brand, model, full sensor resolution, field of view (diagonal/horizontal/vertical), …

those parameters can’t simply be “generated” from nothing.

I thank the calibrationParameters.yml file , would be the output of a C++ program .
Also , I guess it should a kind of camera calibration program . But I do not know how to get it .

the gray code method works with stereo cameras,
you’re probably expected to run a stereo calibration before,
which will calculate the missing params

berak Moderator :
Thanks for your reply .
I will try to do it .
Thanks again !