distortion

Correct barrel distortion in OpenCV manually, without chessboard image

跟風遠走 提交于 2019-11-29 10:04:45
问题 I get images from a camera where it is not possible to take a chessboard picture and calculate the correction matrix using OpenCV. Up to now I corrected the images using imagemagick convert with the option '-distort Barrel "0.0 0.0 -0.035 1.1"' where I got the parameters with trial and error. Now I want to do this inside OpenCV but all I find in the web is the automatic correction using the chessboard image. Is there any chance to apply some simple manual trial and error lens distortion

How to distort an image to any quadrangle?

丶灬走出姿态 提交于 2019-11-29 04:36:20
Do any of you have an idea, how to distort an image in any quadrangle? I want to implement an image, which you can pull any corner in any direction, distorting the image. Anyone has an idea how to do that? I use and write stuff in android for a while now, but it does not seem like android has a function for that. I don't really feel like writing a new math library :). Greetings, Can Andrei Mankevich Looks like you need Canvas.drawBitmapMesh . There is a sample in Android SDK showing how to use it. You need to use Matrix for drawing your bitmap on Canvas . You can easily create such

OpenGL ES 2.0 texture distortion on large geometry GL_REPEAT

浪尽此生 提交于 2019-11-29 02:28:44
OpenGL ES 2.0 has serious precision issues with texture sampling - I've seen topics with a similar problem , but I haven't seen a real solution to this "distorted OpenGL ES 2.0 texture" problem yet. This is not related to the texture's image format or OpenGL color buffers, it seems like it's a precision error. I don't know what specifically causes the precision to fail - it doesn't seem like it's just the size of geometry that causes this distortion, because simply scaling vertex position passed to the the vertex shader does not solve the issue. Here are some examples of the texture distortion

How do I stop a CSS layout from distorting when zooming in/out?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 01:26:23
I've set up a very basic site with a #container div that includes the #navbar and #content. However, when I zoom in or out, the #navbar distorts, if I zoom in the links get pushed down below each other instead of being inline. If I zoom out, too much padding is added between the links. How can I stop this? HTML: <div id="navbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="top.html">Top</a></li> <li><strong><a href="free.html">FREE</a></strong></li> <li><a href="photo.html">Photo</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact Us</a></li> </ul>

Looking for fast image distortion algorithms

最后都变了- 提交于 2019-11-28 20:57:32
I am trying to implement an application which uses shpere distortion filter. I am using an the algorithm from here which changes pixels location by getPixel() and setpixel() methods. My problem is it is too slow for Android devices and there are applications which implements same sphere(and others) filter way faster than my approach. ( for example Picsay Pro app) Could anyone share or give direction to find or implement fast distortion algorithms. Actual filter that implements the algorithm: public boolean sphereFilter(Bitmap b, boolean bSmoothing) { int nWidth = b.getWidth(); int nHeight = b

OpenCV undistorts only a central part of fisheye image

只谈情不闲聊 提交于 2019-11-28 02:06:29
I'm trying to perform fisheye camera calibration via OpenCV 3.4.0 (C++, MS Windows). I used cv::fisheye::calibrate to make K and D (camera matrix and radial distortion coeffitients matrix). Then I used cv::fisheye::initUndistortRectifyMap to produce maps for X and Y coordinates. And finally I used cv::remap to undistort image from fisheye camera via maps from initUndistortRectifyMap. Everything looks right, but OpenCV dewarps only a central part of fisheye image. Edges are moved outside. I'd like to dewarp the whole image. I tried to change focal length in K matrix manually, and got

Looking for fast image distortion algorithms

浪尽此生 提交于 2019-11-27 20:50:10
问题 I am trying to implement an application which uses shpere distortion filter. I am using an the algorithm from here which changes pixels location by getPixel() and setpixel() methods. My problem is it is too slow for Android devices and there are applications which implements same sphere(and others) filter way faster than my approach. ( for example Picsay Pro app) Could anyone share or give direction to find or implement fast distortion algorithms. Actual filter that implements the algorithm:

How to distort an image to any quadrangle?

醉酒当歌 提交于 2019-11-27 16:41:02
问题 Do any of you have an idea, how to distort an image in any quadrangle? I want to implement an image, which you can pull any corner in any direction, distorting the image. Anyone has an idea how to do that? I use and write stuff in android for a while now, but it does not seem like android has a function for that. I don't really feel like writing a new math library :). Greetings, Can 回答1: Looks like you need Canvas.drawBitmapMesh . There is a sample in Android SDK showing how to use it. You

Formulas for Barrel/Pincushion distortion

隐身守侯 提交于 2019-11-27 10:36:46
问题 Can't understand how to get (x', y') of original (x, y) in image, for Barrel/Pincushion distortion. 回答1: Section 2 of this paper explains the transformation. Basically: Here I made an example in Mathematica: 回答2: simple barrel\pincushion distortion in opencv c++ IplImage* barrel_pincusion_dist(IplImage* img, double Cx,double Cy,double kx,double ky) { IplImage* mapx = cvCreateImage( cvGetSize(img), IPL_DEPTH_32F, 1 ); IplImage* mapy = cvCreateImage( cvGetSize(img), IPL_DEPTH_32F, 1 ); int w=

OpenCV undistorts only a central part of fisheye image

一世执手 提交于 2019-11-26 23:38:20
问题 I'm trying to perform fisheye camera calibration via OpenCV 3.4.0 (C++, MS Windows). I used cv::fisheye::calibrate to make K and D (camera matrix and radial distortion coeffitients matrix). Then I used cv::fisheye::initUndistortRectifyMap to produce maps for X and Y coordinates. And finally I used cv::remap to undistort image from fisheye camera via maps from initUndistortRectifyMap. Everything looks right, but OpenCV dewarps only a central part of fisheye image. Edges are moved outside. I'd