Open4.4 , Structured-light Scan

How can I get the " camera calibration file " , " projector setting file " , and " checkerboard pattern file " , for the projectorcalibration.c file , which under the directory of , opencv_contrib/modules/structured_light/samples ?

The C code is as following :

static void help()
{
cout << “\nThis example calibrates a camera and a projector” << endl;
cout << “To call: ./example_structured_light_projectorcalibration <cam_settings_path> "
" <proj_settings_path> <chessboard_path> <calibration_basename>”
" cam settings are parameters about the chessboard that needs to be detected to"
" calibrate the camera and proj setting are the same kind of parameters about the chessboard"
" that needs to be detected to calibrate the projector" << endl;
}

and also the following in main() :

.
.
.

Settings camSettings, projSettings;

CommandLineParser parser(argc, argv, keys);

String camSettingsPath = parser.get<String>(0);
String projSettingsPath = parser.get<String>(1);
String patternPath = parser.get<String>(2);

those settings xml files probably do not exist, they are specific to your current setup. you will need 2 (similar) xml files, one for the camera and one for the projector with content like:

<?xml version="1.0"?>
<opencv_storage>
	<PatternWidth> 9 </PatternWidth>
	<PatternHeight> 13 </PatternHeight>
	<SubPixelWidth> 11 </SubPixelWidth>
	<SubPixelHeight> 11 </SubPixelHeight>
	<SquareSize> 50 </SquareSize>
	<NbrOfFrames> 25 </NbrOfFrames>
	<PatternType> 0 </PatternType>
</opencv_storage>

(values here are taken from the Settings() ctor, you will have to tweak them to fit your needs, have a look at the src code here:

Mr. Berak :
Thanks for your reply very very much !

For a ChessBoard pattern , and the sample xml file you give me , can you give me the picture of the pattern ?
So I can understand how to calculate the value of :

PatternWidth , 9 ;
PatternHeight , 13 ;
SubPixelWidth , 11 ;
SubPixelHeight , 11 ;
SquareSize , 50 ;
NbrOfFrames , 25 ;
from a physical Pattern .

Can you explain it for me , or give me some documents (website link )to explain it ?

Thanks for your support again !

Good Luck !

Mr. Berak :
Thanks for your reply very very much !

For a ChessBoard pattern , and the sample xml file you give me , can you give me the picture of the pattern ?
So I can understand how to calculate the value of :

PatternWidth , 9 ;
PatternHeight , 13 ;
SubPixelWidth , 11 ;
SubPixelHeight , 11 ;
SquareSize , 50 ;
NbrOfFrames , 25 ;
from a physical Pattern .

Can you give me some documents (website link )to explain it ?

Or can someone help me to show me a pattern picture , and its camera setting file , and projector setting file , and pattern file ?

Thanks for your support again !

Good Luck !

hi, do u found out how to do this projector calibration using opencv?