graphics

Automatic tracking algorithm

会有一股神秘感。 提交于 2020-01-03 08:41:36
问题 I'm trying to write a simple tracking routine to track some points on a movie. Essentially I have a series of 100-frames-long movies, showing some bright spots on dark background. I have ~100-150 spots per frame, and they move over the course of the movie. I would like to track them, so I'm looking for some efficient (but possibly not overkilling to implement) routine to do that. A few more infos: the spots are a few (es. 5x5) pixels in size the movement are not big. A spot generally does not

How to zoom picturebox along with graphics

安稳与你 提交于 2020-01-03 06:37:18
问题 I want to zoom picture box along with graphics. this will Zoom the only image part not the graphics part. public Image PictureBoxZoom(Image imgP, Size size) { Bitmap bm = new Bitmap(imgP, Convert.ToInt32(imgP.Width * size.Width), Convert.ToInt32(imgP.Height * size.Height)); Graphics grap = Graphics.FromImage(bm); grap.InterpolationMode = InterpolationMode.HighQualityBicubic; return bm; } private void zoomSlider_Scroll(object sender, EventArgs e) { if (zoomSlider.Value > 0 && img != null) {

openGL shader: two object and one line to connect them

杀马特。学长 韩版系。学妹 提交于 2020-01-03 05:21:27
问题 I'm using shaders and the programmable pipeline, I need to connect two meshes with a line (maybe colored) but I just have the model matrices of these two objects. The line should start at the center of these objects so I assume the object-coords of the two points should be: start point: 0,0,0 end point: 0,0,0 to connect the two objects I assume I'll have to multiply these points in the shader by their respective object's model matrix. And then multiply everything by the view matrix (this is

Graphics BitMapFill TypeError

我是研究僧i 提交于 2020-01-03 05:21:09
问题 I'm working with the easeljs javascript to make a sort of game. I'm using this example: http://www.createjs.com/#!/EaselJS/demos/game As you can see there are spacerocks. This are graphics objects: this.graphics.beginStroke("#FFFFFF"); I would like to fill the background with an image like this: var bitmap = new createjs.Bitmap("http://nielsvroman.be/twitter/root/easeljs/image.png"); this.graphics.beginBitmapFill(bitmap, "no-repeat"); But I always get this error: Uncaught TypeError: Type

Building a hollow cube and filing it with small cubes in MATLAB

末鹿安然 提交于 2020-01-03 05:17:23
问题 I want to build a hollow cube with some dimensions x, y, and z, and fill its volume with many small cubes. The following image is similar to what I want to do, But, instead of small spheres, I want to use small cubes. After building the cube and filling it with other small cubes, I want to build a matrix that represents these small cubes inside the big one, this is because I want to be able to access every small cube, where I need to change its color . Is it possible to have this matrix

R levelplot: color green-white-red (white on 0) according to one variable, but show the values of another variable

北城余情 提交于 2020-01-03 05:15:44
问题 The title is pretty much self-descriptive. I want to do a heatmap-like plot with lattice, showing the data values as well, something like in here However, in my case, I want to color the plot according to one variable (fold.change), but show the values of another variable (p.value). It would be optimal that the color range is green-white-red, and the white is on 0 (negative fold.change values in green, and positive ones in red). My last question would be how to change the text size of the

R levelplot: color green-white-red (white on 0) according to one variable, but show the values of another variable

馋奶兔 提交于 2020-01-03 05:15:14
问题 The title is pretty much self-descriptive. I want to do a heatmap-like plot with lattice, showing the data values as well, something like in here However, in my case, I want to color the plot according to one variable (fold.change), but show the values of another variable (p.value). It would be optimal that the color range is green-white-red, and the white is on 0 (negative fold.change values in green, and positive ones in red). My last question would be how to change the text size of the

Adding a text only panel to base graphics layout

夙愿已清 提交于 2020-01-03 04:33:27
问题 3 plots arranged in 2 rows and 2 columns attach(mtcars) par(mfrow=c(2,2)) plot(wt,mpg, main="Scatterplot of wt vs. mpg") plot(wt,disp, main="Scatterplot of wt vs disp") boxplot(wt, main="Boxplot of wt") But how do I create a panel with just text and then add it to the fourth position in the grid. Apologies. I see now that like many quesioners I was asking you to read my mind or intuit from my code that I expected the text to be arranged left-justified in a grid of locations in the blank space

Analog speedometer

╄→гoц情女王★ 提交于 2020-01-03 04:23:07
问题 Can somebody give me a tutorial on how to make an analog speedometer with Android? I have currently the speed (get by GPS), but I don't know how to do the graphic part. 回答1: I've been looking for something similar that I could convert into a game spinner. I found this tutorial for an analog thermometer. http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ 回答2: Check http://developer.android.com/guide/topics/graphics/2d-graphics.html Look for "ShapeDrawable". You

Binary space partition tree for 3D map

萝らか妹 提交于 2020-01-03 03:09:15
问题 I have a project which takes a picture of topographic map and makes it a 3D object. When I draw the 3D rectangles of the object, it works very slowly. I read about BSP trees and I didn't really understand it. Can someone please explain how to use BSP in 3D (maybe give an example)? and how to use it in my case, when some mountains in the map cover other parts so I need to organize the rectangles in order to draw them well? 回答1: In n-D a BSP tree is a spatial partitioning data structure that