graphics

gnuplot - How can I save a graphics file of a plot that is the same as I designed it in xterminal?

[亡魂溺海] 提交于 2021-01-01 04:44:29
问题 I have been making plots for some time now, and they are precisely the way I like them, on screen. The data is coming in from sensors related to solar power collection and storage. Plotted on screen they look great so I do a screen region capture to save them. So now I would like to automate the saving process. Here is what I have done so far: I set up a cron job so they would be run right at midnight, capturing the whole day and saving it as a .png file Then it moves the "today.dat" data

How to map optical flow field (float) to pixel data (char) for image warping?

眉间皱痕 提交于 2020-12-30 20:40:44
问题 I've been playing with the optical flow functions in OpenCV and am stuck. I've successfully generated X and Y optical flow fields/maps using the Farneback method, but I don't know how to apply this to the input image coordinates to warp the images. The resulting X and Y fields are of 32bit float type (0-1.0), but how does this translate to the coordinates of the input and output images? For example, 1.0 of what? The width of the image? The difference between the two? Plus, I'm not sure what

How to map optical flow field (float) to pixel data (char) for image warping?

心不动则不痛 提交于 2020-12-30 20:16:53
问题 I've been playing with the optical flow functions in OpenCV and am stuck. I've successfully generated X and Y optical flow fields/maps using the Farneback method, but I don't know how to apply this to the input image coordinates to warp the images. The resulting X and Y fields are of 32bit float type (0-1.0), but how does this translate to the coordinates of the input and output images? For example, 1.0 of what? The width of the image? The difference between the two? Plus, I'm not sure what

How to map optical flow field (float) to pixel data (char) for image warping?

假装没事ソ 提交于 2020-12-30 20:15:55
问题 I've been playing with the optical flow functions in OpenCV and am stuck. I've successfully generated X and Y optical flow fields/maps using the Farneback method, but I don't know how to apply this to the input image coordinates to warp the images. The resulting X and Y fields are of 32bit float type (0-1.0), but how does this translate to the coordinates of the input and output images? For example, 1.0 of what? The width of the image? The difference between the two? Plus, I'm not sure what

How to map optical flow field (float) to pixel data (char) for image warping?

人盡茶涼 提交于 2020-12-30 20:14:06
问题 I've been playing with the optical flow functions in OpenCV and am stuck. I've successfully generated X and Y optical flow fields/maps using the Farneback method, but I don't know how to apply this to the input image coordinates to warp the images. The resulting X and Y fields are of 32bit float type (0-1.0), but how does this translate to the coordinates of the input and output images? For example, 1.0 of what? The width of the image? The difference between the two? Plus, I'm not sure what

How to map optical flow field (float) to pixel data (char) for image warping?

旧时模样 提交于 2020-12-30 20:09:57
问题 I've been playing with the optical flow functions in OpenCV and am stuck. I've successfully generated X and Y optical flow fields/maps using the Farneback method, but I don't know how to apply this to the input image coordinates to warp the images. The resulting X and Y fields are of 32bit float type (0-1.0), but how does this translate to the coordinates of the input and output images? For example, 1.0 of what? The width of the image? The difference between the two? Plus, I'm not sure what

How to find and print intersections of n given circles in O(n*log(n)) time?

心不动则不痛 提交于 2020-12-29 06:45:06
问题 I'm looking for an O(n*logn) algorithm to find and print the intersections of n given circles. Each circle is specified by its center and radius. An O(n 2 ) algorithm consists in checking if the distance between the centers is less than or equal to the sum of the radii (of the two circles being compared). However, I'm looking for a faster one! A similar problem is intersection of line segments. I think even my problem can be solved using line sweep algorithm, but I am unable to figure out how

PyCairo指南--目录

Deadly 提交于 2020-12-24 01:06:30
PyCairo tutorial的翻译,其原文地址为: http://zetcode.com/gfx/pycairo/ 。 PyCairo指南 这是 PyCairo指南 。在这份指南中,我们将基于Python和Cairo库来学习2D图形编程。 内容目录 简介 后端 基本绘图 形状和填充 渐变 裁剪和蒙版 透明度 变换 文本 图片 根窗口 PyCairo PyCairo是一个用来与Cairo库一起工作的Python模块。他是到Cairo C库的Python绑定的集合。除了一些需要更加Pythonic的方式的情况,它与C API是紧密对应的。 相关的指南 Cairo graphics tutorial 基于C编程语言来说明Cairo库。 来源: oschina 链接: https://my.oschina.net/u/919237/blog/133430

C# - TextRenderer.MeasureText is a few pixels too wide

隐身守侯 提交于 2020-12-16 06:27:40
问题 I'm using TextRendere.MeasureText instead of Graphics.MeasureString because it allows me to specify TextFormatFlags.NoPadding, but its return width is a few pixels to wide. For a four character text string its five pixels over and for a five character text string its six pixels over. I'm sure its going to be even more with longer text strings. I'm using .Net 4.5.1. Here's my code: Size size = TextRenderer.MeasureText(items[a], new Font("Segoe UI", 12, GraphicsUnit.Pixel), new Size(Width, 15),

how do I get rotations of each axis from rotations with a vector axis?

一曲冷凌霜 提交于 2020-12-15 05:37:12
问题 so I have an AxisAngle4f object with a vector3D as axis and an angle, how do I get rotation angle for each of x,y,z axes? 回答1: create 4x4 homogenous transform matrix representing your rotation first see Understanding 4x4 homogenous transform matrices so basically you want 3 basis vectors and origin of unit matrix then rotate each by your rotation (for that you can use this or glRotate or whatever). Here C++ example: void rotate3d(float alfa,float *axis,float *point) { float p[3],q[3],c=cos