distortion

Right use of initUndistortRectifyMap and remap from OpenCV

别来无恙 提交于 2019-12-12 05:49:41
问题 I want to undistort a camera image. The undistort function of OpenCV is too slow, so I want to split it like mentioned in the documentation into the 2 calls of initUndistortRectifyMap (as init step) and remap (in the render loop). At first, I tried a test program with the principal approach: //create source matrix cv::Mat srcImg(res.first, res.second, cvFormat, const_cast<char*>(pImg)); //fill matrices cv::Mat cam(3, 3, cv::DataType<float>::type); cam.at<float>(0, 0) = 528.53618582196384f;

Rectify an Image with Matlab's “camerParams” (Computer Vision System Toolbox)

僤鯓⒐⒋嵵緔 提交于 2019-12-11 14:47:09
问题 I'm working on a PIV-Workflow and I'm currently pre-processing the images. I need to get rid of the perspective distortion in the images. I do have the "image processing toolbox" and the "camera calibrator". I already got rid of the lens distortion with "undistortImage();" and the cameraParams object, which is inferred through a chessboard pattern. First Question: Is it possible to use the cameraParams object to distort the image perspectively, so that my chessboard is rectified in the image?

Three.js: using an image texture causes other objects to disappear

此生再无相见时 提交于 2019-12-11 13:58:45
问题 I'm trying to visualize a space time cube. As a reference I take this image I found on google: http://www.intechopen.com/source/html/38305/media/image7.jpeg . Actually I managed to do it but there is a weird bug as soon as I start to use a texture for the bottom of the cube (which is a plane in my case). The things that are just above the plane are some how not always visible and the image is sometimes distorted. It is hard to explain so you might check the jfiddle out I created: http:/

Facebook Like Box - photos appearing stretched

吃可爱长大的小学妹 提交于 2019-12-11 13:33:29
问题 I've just added the Facebook like box to www.glasgow.ac.uk/careers. It seems to be working fine, except that photos are appearing stretched/distorted in the box (i.e. one at the moment is about twice the height it should be.) We've changed from the default box width, but even at the default this was happening with our pictures. Is there any way to fix this? Many thanks, Jamie 回答1: Jamie: Based on multiple examples, I have inferred the algorithm that Facebook are using to resize photos in the

how to get all undistorted image with opencv

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 10:51:03
问题 I'm unsing cv::undistort but it crops the image. I'd like to have all the undistorted image, so that the undistorted size is bigger then the original one, like this: I think I need to use cv::getOptimalNewCameraMatrix but I had no luck with my trials.. some help? 回答1: Just for the record: You should use cv::getOptimalNewCameraMatrix and set the aplha parameter to 1. Aplha 0 only shows valid points on the image, alpha 1 shows all the original points as well as black regions. 回答2: This code

Ios - ImageMagick - No Image Created after Distortion

南笙酒味 提交于 2019-12-08 17:34:28
I am new To ImageMagick, and in my iOS App i want to apply Shepard Distortion on a image and get back UIimage i am Coding as Follows -(void)distortImage{ MagickWandGenesis(); MagickWand * wand; MagickBooleanType status; wand = NewMagickWand(); MagickSetFormat(wand, "png"); status = MagickReadImage(wand,"chess.png"); // Arguments for Shepards double points[8]; points[0] = 250; // First X point (starting) points[1] = 250; // First Y point (starting) points[2] = 50; // First X point (ending) points[3] = 150; // First Y point (ending) points[4] = 500; // Second X point (starting) points[5] = 380;

Is there a camera calibration matrix database?

醉酒当歌 提交于 2019-12-08 17:21:25
问题 Is there a free-access database containing camera calibration parameters (camera matrices, intrinsic and extrinsic parameters) for the most popular devices? I'm particularly interested in mobile-phone cameras or tablets with fixed focal length more than DSC's or DSLR's. The idea is that an app using computer vision algorithms could access the database and download the parameters and be able to work right away, instead of making the users to calibrate their devices (and avoid having to

ios - ImageMagick How to code to apply ShepardsDistortion on image

时光怂恿深爱的人放手 提交于 2019-12-08 07:40:56
问题 I am new to ImageMagick,and i want to develop an effect of ShepardsDistortion on source image. i gone through many posts and sites, but i didn't find way to implement "ShepardsDistortion" in iOS. MagickWand *mw = NewMagickWand(); MagickSetFormat(mw, "png"); UIImage *sourceImage=[_sourceImgView image]; NSData *imgData=UIImagePNGRepresentation(sourceImage); MagickReadImageBlob(mw, [imgData bytes], [imgData length]); Image *image=GetImageFromMagickWand(mw); DistortImage(image, ShepardsDistortion

Ios - ImageMagick - No Image Created after Distortion

北城以北 提交于 2019-12-08 07:27:16
问题 I am new To ImageMagick, and in my iOS App i want to apply Shepard Distortion on a image and get back UIimage i am Coding as Follows -(void)distortImage{ MagickWandGenesis(); MagickWand * wand; MagickBooleanType status; wand = NewMagickWand(); MagickSetFormat(wand, "png"); status = MagickReadImage(wand,"chess.png"); // Arguments for Shepards double points[8]; points[0] = 250; // First X point (starting) points[1] = 250; // First Y point (starting) points[2] = 50; // First X point (ending)

Fisheye distortion rectification with lookup table

感情迁移 提交于 2019-12-08 02:32:27
问题 I have a fisheye lens: I would like to undistort it. I apply the FOV model: rd = 1 / ω * arctan (2 * ru * tan(ω / 2)) //Equation 13 ru = tan(rd * ω) / 2 / tan(ω / 2) //Equation 14 as found in equations (13) and (14) of the INRIA paper "Straight lines have to be straight" https://hal.inria.fr/inria-00267247/document. The code implementation is the following: Point2f distortPoint(float w, float h, float cx, float cy, float omega, Point2f input) { //w = width of the image //h = height of the