From c2bfc3edbd2853f588d107689fac285910fa12b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Mon, 25 Sep 2023 09:01:22 +0200 Subject: [PATCH] Fix typos undistort.md --- src/neon/how-tos/advance-analysis/undistort.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/neon/how-tos/advance-analysis/undistort.md b/src/neon/how-tos/advance-analysis/undistort.md index 260a957a4..04c59f08c 100644 --- a/src/neon/how-tos/advance-analysis/undistort.md +++ b/src/neon/how-tos/advance-analysis/undistort.md @@ -4,7 +4,7 @@ description: "Undistorting Neon's scene camera video and gaze data, using the in permalink: /neon/how-tos/advance-analysis/undistort/ --- # Correcting for the lens distortion on Neon's scene camera -A circumstance that often arises in wearable eye tracking setups is the presence of distortions on the scene camera. The type of lenses used, with their wide-angle characteristics, allow for a broad field of view, enabling the capture of more information within a single frame. However, this advantage comes at the cost of introducing distortions to the image. +A circumstance that often arises in wearable eye-tracking setups is the presence of distortions on the scene camera. The type of lenses used, with their wide-angle characteristics, allows for a broad field of view, enabling the capture of more information within a single frame. However, this advantage comes at the cost of introducing distortions to the image. While we account for them in Pupil Cloud, and we even give you the possibility to download the undistorted video using the [Gaze Overlay enrichment](/enrichments/gaze-overlay), this is not the case when using the [Realtime API](/neon/real-time-api) or raw data, where you may want to correct it by yourself. @@ -41,13 +41,13 @@ keyboard=enabled :::tip -**TLDR**; Correcting for lens distortions is crutial for spatial analysis and comparability across studies. +**TLDR**; Correcting for lens distortions is crucial for spatial analysis and comparability across studies. ::: ## How to correct for the lens distortions? In this tutorial, we will cover how to read the provided intrinsic and extrinsic camera parameters and correct for the lens distortions in Neon's scene camera. We will also show you how to undistort the gaze data, so that you can map the gaze position onto the undistorted scene camera video. -We will be using Python and OpenCV to perform the undistortion but the same principles apply to other programming languages and libraries. +We will be using Python and OpenCV to perform the undistortion, but the same principles apply to other programming languages and libraries. ## Requirements To follow this guide, you will need to have the following libraries installed on your python environment: @@ -69,7 +69,7 @@ def read_from_json(path): data = json.load(f) return data ``` -Where **path** points to the **scene_camera.json** file. Then, we will store the scene camera matrix, distortion coefficients in variables for later use. +Where **path** points to the **scene_camera.json** file. Then, we will store the scene camera matrix, and distortion coefficients in variables for later use. ```python calibration = read_from_json(path) @@ -106,7 +106,7 @@ def read_instrinsics_neon(path): ) ``` -Where **path** points to the calibration file, which is located in the same folder as the raw data with the name **calibration.bin**. Then, we will store the scene camera matrix, distortion coefficients in variables for later use. +Where **path** points to the calibration file, which is located in the same folder as the raw data with the name **calibration.bin**. Then, we will store the scene camera matrix, and distortion coefficients in variables for later use. ``` python calibration = read_instrinsics_neon(path) @@ -176,11 +176,11 @@ xy_undist = cv2.undistortPoints(xy.reshape(-1, 1, 2).astype(np.float32), K, D, P=K) xy_undist = xy_undist.reshape(-1, 2) ``` -On the examplme below, we show the original gaze points overlaid ove the undistorted frame (in red) and the undistorted point positions (in yellow): +On the example below, we show the original gaze points overlaid over the undistorted frame (in red) and the undistorted point positions (in yellow):
-
\ No newline at end of file +