Use opencv to correct image distortion

1 Affine transformation 1.1 What is affine transformation In image processing, it is often necessary to perform various operations on images, such as translation, scaling, rotation, flipping, etc., which are all affine transformations of images. Image affine transformation, also known as image affine mapping, means that in geometry, a vector space is transformed into another […]

Python implements dual-targeting, distortion correction, and stereoscopic correction

1. The role of dual-targeting, distortion correction, and stereoscopic correction Binocular Targeting: 3D reconstruction and ranging: Through binocular targeting, you can determine the relative position and orientation between the two cameras, so that you can calculate the depth of the object based on the parallax information and perform 3D reconstruction and ranging. Pose Estimation: Binocular […]

A study on the difference between the initUndistortRectifyMap () function in OpenCV and the dedistortion formula in Lecture 14

Article directory 1. The dedistortion formula in Lecture 14 2. Dedistortion formula in OpenCV 3. Difference between 4 parameters and 8 parameters 4.initUndistortRectifyMap() function source code Recently, I discovered a problem when using OpenCV to dedistort fisheye camera images. The parameters used to dedistort based on the pinhole model are a little different from the […]

Code: De-distortion fisheye camera images

Image projection model: pinhole [fx, fy, cx, cy] Image distortion model: tangential radial distortion [k1, k2, p1, p2] Description: Used for memo The first part is the conventional de-distortion operation, which is to de-distort the fisheye camera when the internal parameters are known. The remap mapping is used here. After de-distorting the image, all the […]

Scene:Translucency-Distortion &PostProcessing:ComposeTranslucencyToNewSceneColor

1.Accumulate: DistortionAccumulatePS.usf void Main( FVertexFactoryInterpolantsVSToPS Interpolants, float4 PixelPosition : TEXCOORD6, in float4 SvPosition : SV_Position , in bool bIsFrontFace : SV_IsFrontFace , out float4 OutColor : SV_Target0 ) { const uint EyeIndex = 0; ResolvedView = ResolveView(); FMaterialPixelParameters MaterialParameters = GetMaterialPixelParameters(Interpolants, SvPosition); FPixelMaterialInputs PixelMaterialInputs; CalcMaterialParameters(MaterialParameters, PixelMaterialInputs, SvPosition, bIsFrontFace); float3 Normal = GetMaterialNormal(MaterialParameters, PixelMaterialInputs); float2 NDC […]

Encoding, storage and decoding output of images (based on Android, converting images to Base64 encoding and then decoding them again will cause image distortion)

Android stores the Bsae64-encoded image into MySQL and decodes the output for viewing (problem: image distortion) Android project download: Link: https://pan.baidu.com/s/1hvVupGcCf1f41fizF08SNg?pwd=9988 Extraction code: 9988 Part of the source code: package com.example.testandroidmysqlphplogin; import androidx.appcompat.app.AppCompatActivity; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.os.Message; import android.text.TextUtils; import android.text.method.ScrollingMovementMethod; import android.util.Base64; import android.view.View; import android.widget.Button; import android.widget.EditText; […]

Opencv performs distortion correction on the camera, and coordinates before and after correction

Article directory 1. Background 2. Demand analysis 3. Solutions 3.1. Lens distortion correction 3.2. Know the coordinates (x, y) of the corrected screen, and find its coordinates (x’, y’) in the original screen 3.2. Know the original screen coordinates (x1, y1), find the corrected screen coordinates (x2, y2) 4. Effect 5. Code 1. Background There […]

Camera calibration and distortion correction with opecv

This article is just to briefly record the steps of camera calibration and distortion correction, the specific principle and code reference: Pages 243 to 249 of OpenCV-Python-Toturial-Chinese Version.pdf E-book and chessboard picture Baidu network disk download: https://pan.baidu.com/s/1oAKlGC2o0J9z3QBcK043QQ Extract code: 1c6x The whole process is divided into two steps: acquisition of camera matrix and distortion coefficient, […]