<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Kinovea - Forums — Doc draft: Lens calibration]]></title>
		<link>https://www.kinovea.org/en/forum/viewtopic.php?id=1977</link>
		<atom:link href="https://www.kinovea.org/en/forum/extern.php?action=feed&amp;tid=1977&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Doc draft: Lens calibration.]]></description>
		<lastBuildDate>Sun, 07 Dec 2025 10:00:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Doc draft: Lens calibration]]></title>
			<link>https://www.kinovea.org/en/forum/viewtopic.php?pid=7136#p7136</link>
			<description><![CDATA[<p>Yes the pattern should cover about a quarter of the frame. This is just a rough guideline, it will work even if it&#039;s not exactly that. You can have other things visible in the frame.</p><p>It should be moved around to cover the sides and corners of the frame, but not go partially outside, all the inner corners between the squares should be visible at all time. It can be tilted / seen in perspective.</p><p>The code internally uses OpenCV for this so you might find other guides online searching for OpenCV camera calibration.</p>]]></description>
			<author><![CDATA[null@example.com (joan)]]></author>
			<pubDate>Sun, 07 Dec 2025 10:00:29 +0000</pubDate>
			<guid>https://www.kinovea.org/en/forum/viewtopic.php?pid=7136#p7136</guid>
		</item>
		<item>
			<title><![CDATA[Re: Doc draft: Lens calibration]]></title>
			<link>https://www.kinovea.org/en/forum/viewtopic.php?pid=7134#p7134</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>When filming make sure the entire pattern is visible at all time, about a quarter of the image size</p></blockquote></div><p>Does the quarter here mean that the entire pattern should be around a quarter of the available space in the frame? I can include the things outside the checkerboard? Any optimization tips like if the video should be hovering around the same point or it helps to have the checkerboard more to the outside or it should be centered always?</p>]]></description>
			<author><![CDATA[null@example.com (shumayal)]]></author>
			<pubDate>Fri, 05 Dec 2025 10:58:01 +0000</pubDate>
			<guid>https://www.kinovea.org/en/forum/viewtopic.php?pid=7134#p7134</guid>
		</item>
		<item>
			<title><![CDATA[Doc draft: Lens calibration]]></title>
			<link>https://www.kinovea.org/en/forum/viewtopic.php?pid=6449#p6449</link>
			<description><![CDATA[<p>This is the documentation draft for the page &quot;Lens calibration&quot; of the manual.</p><p>The first post contains the documentation that will be synchronized with the manual and you can post comments to add feedback or discuss points that are unclear.</p><p>-----------------------<br /><strong>Introduction</strong></p><p>Lens calibration is the process of calculating the internal parameters of the camera used to film the video. These include the field of view and distortion of the lens.</p><p>Lens calibration is currently used in two aspects of Kinovea: <br />- For measurements and display, the distortion is taken into account and coordinates are rectified before they are passed to the spatial calibration. <br />- In the Calibration validation dialog, to calculate the camera distance and measure the error of points that are outside the plane of motion. See Calibration validation.</p><p><span class="postimg"><img src="https://www.kinovea.org/help/en/_images/distorted-coordinatesystem.png" alt="https://www.kinovea.org/help/en/_images/distorted-coordinatesystem.png" /></span><br />Barrel distortion exposed by a GoPro action camera and the default coordinate system after lens distortion calibration.</p><p>Lens calibration is compatible with both line calibration and plane calibration. The coordinate system, lines and grid objects are drawn distorted to follow the distortion. The images themselves are not rectified.</p><p><strong>Lens calibration procedure overview</strong></p><p>Here is an overview of the lens calibration procedure<br />- Film a calibration pattern with the camera to be calibrated<br />- Open the calibration video in Kinovea<br />- Open the dedicated lens calibration mode<br />- Run the automated lens calibration<br />- Save the resulting data to a file<br />- When analyzing videos filmed with the same cameras, load the saved lens calibration profile</p><p><strong>Calibration pattern</strong> </p><p>You can find a pattern here: <a href="https://github.com/opencv/opencv/blob/master/doc/pattern.png?raw=true">https://github.com/opencv/opencv/blob/m … g?raw=true</a></p><p><strong>Note: </strong><br />The linked pattern image states that it is a 9x6 pattern because it&#039;s only counting the internal corners instead of the actual squares in the grid. Inside Kinovea the configuration dialog assumes the number given is the number of squares, so this pattern is referenced as a 10x7 pattern. Always count the number of squares to make sure the algorithm knows what to expect.</p><p><span class="bbu">Guidelines for filming the pattern</span><br />- Film the pattern for a few seconds from various angles<br />- The dedicated mode is only available when images are cached so don&#039;t make the video too long<br />- When filming make sure the entire pattern is visible at all time, about a quarter of the image size<br />- Don&#039;t move too fast to avoid motion blur<br />- You don&#039;t have to print the image, just display it on a flat screen or a tablet<br />- The physical size of the filmed pattern doesn&#039;t matter<br />- You can either move the camera or move the checkerboard pattern, it doesn&#039;t matter<br />- You can use a different checker board pattern as long as you adjust the parameters in the configuration</p><p><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-video.jpg" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-video.jpg" /></span></p><p><strong>Open the lens calibration mode</strong></p><p>Load the video of the calibration pattern in Kinovea.</p><p>Open the lens calibration mode using the menu Video &gt; Lens calibration. This mode is also available from the menu Tools &gt; Lens calibration &gt; Lens calibration mode.</p><p><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode-menu.png" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode-menu.png" /></span></p><p>Note: this will only be available when the video is short enough to trigger the “cached” mode (or<br />enough cache memory is allocated).</p><p><strong>Run lens calibration</strong></p><p>Right click the background and select menu Action &gt; Run lens calibration.</p><p>It will show a progress bar while it calculates the parameters. When the calculation is complete it will paint the corners it has found on the checker board and display the results in the top left corner.</p><p>In this mode the player only shows the few frames used to perform the computation. Navigate the video and inspect the result. The colored patterns shows the detected corners and the reprojected corners based on the calculated calibration. There should not be any large divergence between the two.</p><p>Here is an example of a bad result due to poor lighting and motion blur on several frames<br /><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-bad.jpg" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-bad.jpg" /></span></p><p><strong>Lens calibration configuration</strong></p><p>The algorithm can be configured by right clicking in the background of the video and selecting the menu Configuration…</p><p><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-configuration.png" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-configuration.png" /></span></p><p>- Max images: number of images used for the computation<br />- Pattern size: the number of columns and rows of the checker board pattern to detect in the images. This must match the images<br />- Max iterations: number of iterations used by the optimization loop.</p><p><strong>Save the data</strong></p><p>Once you are happy with the result save the calibration data to a file by using the Save calibration data… menu. </p><p>Give it a descriptive name and save it preferably under the CameraCalibration folder in the Application Data folder of Kinovea to make it directly available as a menu in the program.</p><p><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode.jpg" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode.jpg" /></span></p><p><strong>Load an existing calibration</strong></p><p>If you have saved the calibration file in the Application data under the CameraCalibration folder, it will appear in the Tools &gt; Lens calibration menu. Pick the calibration corresponding to the camera used to film the current video to load the data.</p><p><span class="postimg"><img src="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-menu2.png" alt="https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-menu2.png" /></span></p><p>If you saved the lens calibration file elsewhere you may load it manually using the Import menu.</p><p><span class="postimg"><img src="https://www.kinovea.org/help/en/_images/distorted-coordinatesystem-plane.png" alt="https://www.kinovea.org/help/en/_images/distorted-coordinatesystem-plane.png" /></span></p><p><strong>! Note </strong><br />Any change of camera model, lens, or configuration options involving image resolution or zoom requires a new calibration procedure.</p>]]></description>
			<author><![CDATA[null@example.com (joan)]]></author>
			<pubDate>Sat, 28 Sep 2024 17:48:48 +0000</pubDate>
			<guid>https://www.kinovea.org/en/forum/viewtopic.php?pid=6449#p6449</guid>
		</item>
	</channel>
</rss>
