Borrar filtros
Borrar filtros

Is it possible to use the Camera Calibration feature without a checkerboard image?

19 visualizaciones (últimos 30 días)
Is it possible to use known points in the field of view, instead of the checkerboard image, in the Camera Calibration toolbox?

Respuestas (1)

Dima Lisin
Dima Lisin el 13 de Oct. de 2015
Hi Eric,
Are you talking about the Camera Calibrator app in the Computer Vision System toolbox? If so, then unfortunately it only works with checkerboard images. However, under the hood the app calls the estimateCameraParameters function, and that you can use with any calibration pattern.
  1 comentario
George Kouskoulis
George Kouskoulis el 17 de Jun. de 2016
Dear Lima,
trying on tracking speed centroid (based on Matlab's motion based multiple object tracking algorithm - http://www.mathworks.com/help/vision/examples/motion-based-multiple-object-tracking.html) I faced the issue of calibrating my camera. Unfortunately my video covers a big area where I cannot find such a huge ckeckerboard in order to do the camera calibration. I used the estimateCameraParameters function, as you suggested. Particularly I used 19 images from my area, specify four same points in each picture, define their world coordinates and apply the code below:
% code
% Define images to process
numImages = 19;
files = cell(1, numImages);
for i = 1:numImages
files{i} = fullfile('D:','Documents','Ε.Μ.Π','Pedestrian tracking','Images for calibration','Session3','PngImages2', sprintf('%d.png', i));
end
imagePoints(:,:,1) = [954 2623; 1534 477; 2530 529; 2842 2735;];
imagePoints(:,:,2) = [932 2616; 1566 503; 2558 430; 2760 2676;];
imagePoints(:,:,3) = [932 2300; 1450 115; 2489 151; 2789 2369;];
imagePoints(:,:,4) = [1071 2327; 1486 89; 2538 127; 2959 2365;];
imagePoints(:,:,5) = [1223 2831; 1697 598; 2703 613; 3204 2886;];
imagePoints(:,:,6) = [1181 2236; 1680 24; 2748 40; 3080 2346;];
imagePoints(:,:,7) = [1000 2499; 1579 351; 2601 314; 2902 2562;];
imagePoints(:,:,8) = [850 2369; 1460 222; 2488 135; 2688 2391;];
imagePoints(:,:,9) = [543 2635; 1370 506; 2372 506; 2467 2742;];
imagePoints(:,:,10) = [587 2252; 1342 106; 2382 122; 2430 2370;];
imagePoints(:,:,11) = [655 2277; 1290 80; 2338 106; 2526 2340;];
imagePoints(:,:,12) = [741 2369; 1196 115; 2246 86; 2632 2302;];
imagePoints(:,:,13) = [920 2706; 1490 513; 2494 547; 2838 2784;];
imagePoints(:,:,14) = [898 2416; 1516 215; 2533 362; 2768 2581;];
imagePoints(:,:,15) = [982 2453; 1540 283; 2557 363; 2857 2582;];
imagePoints(:,:,16) = [1018 2468; 1521 296; 2542 319; 2892 2535;];
imagePoints(:,:,17) = [921 2546; 1401 355; 2417 359; 2807 2550;];
imagePoints(:,:,18) = [825 2398; 1403 217; 2435 199; 2698 2435;];
imagePoints(:,:,19) = [807 2315; 1305 104; 2353 40; 2666 2275;];
worldPoints = [800 2500; 1500 300; 2500 500; 2700 2500];
cameraParams = estimateCameraParameters(imagePoints,worldPoints);
% Compute rotation and translation of the camera.
[R, t] = extrinsics(imagePoints, worldPoints, cameraParams);
Unfornately I get the error below that mentions that expected imagePoints to be two-dimensional.
I think that I have defined them as two-dimensional. Could you help me please in order to find my mistake?
Thank you in advance!

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by