radial

Animate a Canvas circle to draw on load

前提是你 提交于 2019-11-29 00:16:56
OK Hello. I've decided to start using HTML canvas for a small project I have. There's no real start yet. I'm just learning the basics of Canvas and I want to Animate a circle <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>title</title> <style> body { margin: 0px; padding: 0px; background: #222; } </style> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <canvas id="myCanvas" width="578" height="250"></canvas> <script> var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var x = canvas.width / 2; var y = canvas.height / 2;

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

matplotlib: adding padding/offset to polar plots tick labels

孤街浪徒 提交于 2019-11-27 22:59:40
Is there a way to increase the padding/offset of the polar plot tick labels (theta)? import matplotlib import numpy as np from matplotlib.pyplot import figure, show, grid # make a square figure fig = figure(figsize=(2, 2)) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') ax.set_yticklabels([]) r = np.arange(0, 3.0, 0.01) theta = 2*np.pi*r ax.plot(theta, r, color='#ee8d18', lw=3) ax.set_rmax(2.0) show() I'd like to have theta tick labels further away from the polar plot so they don't overlap. First of all; seeing as how you have specified the figsize to be (2,2) and having

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

matplotlib: adding padding/offset to polar plots tick labels

帅比萌擦擦* 提交于 2019-11-26 21:20:19
问题 Is there a way to increase the padding/offset of the polar plot tick labels (theta)? import matplotlib import numpy as np from matplotlib.pyplot import figure, show, grid # make a square figure fig = figure(figsize=(2, 2)) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') ax.set_yticklabels([]) r = np.arange(0, 3.0, 0.01) theta = 2*np.pi*r ax.plot(theta, r, color='#ee8d18', lw=3) ax.set_rmax(2.0) show() I'd like to have theta tick labels further away from the polar plot so

How to simulate fisheye lens effect by openCV?

故事扮演 提交于 2019-11-26 17:33:26
I am looking for ways to create fisheye lens effect, looked at documentations for openCV, it looks like it contains Camera Calibration functions for radial distortions like fisheye. Is it possible to simulate fisheye distortion by openCV? If it is possible to do it by openCV, comparing to openGL, which one will generate better results? Thanks. I created this app using opencv. Is this the effect you are referring to? I basically coded the formula shown on wikipedia's "Distortion(optics)" I can show the code if needed Update : OK, so below is the actual code written in c++ using opencv (not

How to simulate fisheye lens effect by openCV?

给你一囗甜甜゛ 提交于 2019-11-26 06:06:33
问题 I am looking for ways to create fisheye lens effect, looked at documentations for openCV, it looks like it contains Camera Calibration functions for radial distortions like fisheye. Is it possible to simulate fisheye distortion by openCV? If it is possible to do it by openCV, comparing to openGL, which one will generate better results? Thanks. 回答1: I created this app using opencv. Is this the effect you are referring to? I basically coded the formula shown on wikipedia's "Distortion(optics)"