transformation

Imagick: compose with mask

落花浮王杯 提交于 2019-11-27 23:16:19
问题 I try to recreate a script that uses the ImageMagick command "convert" to compose an image. But I want to do the same in PHP using Imagick (version 6.6.2-10). The command is as follows: convert A1.mpc A3.mpc A4.mpc -channel rgba -alpha on -virtual-pixel background -background none -define compose:args=312x26.6776 -compose displace -composite out.mpc I found out that the parameters stand for the following: convert {background} {overlay} [{mask}] [-compose {method}] -composite {result} The PHP

OpenCV Transform using Chessboard

我是研究僧i 提交于 2019-11-27 19:55:57
I have only just started experimenting with OpenCV a little bit. I have a setup of an LCD with a static position, and I'd like to extract what is being displayed on the screen from the image. I've seen the chessboard pattern used for calibrating a camera, but it seems like that is used to undistort the image, which isn't totally what I want to do. I was thinking I'd display the chessboard on the LCD and then figure out the transformations needed to convert the image of the LCD into the ideal view of the chessboard directly overhead and cropped. Then I would store the transformations, change

OpenGL Rotation of an object around a line

ⅰ亾dé卋堺 提交于 2019-11-27 18:50:46
问题 I am programming in OpenGL and C++. I know 2 points on 1 line (a diagonal line) and wish to rotate an object around that diagonal line. How can I go about doing this? I know how to use glrotatef to rotate it around the x, y or z axis but am not sure about this. 回答1: The x, y and z parameters to glRotate can specify any arbitrary axis, not just the x, y and z axes. To find an axis passing through your line, just subtract the end-points of the line to get an axis vector: if the two points are

Advanced tasks using Web.Config transformation

China☆狼群 提交于 2019-11-27 17:08:11
Does anyone know if there is a way to "transform" specific sections of values instead of replacing the whole value or an attribute? For example, I've got several appSettings entries that specify the Urls for different webservices. These entries are slightly different in the dev environment than the production environment. Some are less trivial than others <!-- DEV ENTRY --> <appSettings> <add key="serviceName1_WebsService_Url" value="http://wsServiceName1.dev.domain.com/v1.2.3.4/entryPoint.asmx" /> <add key="serviceName2_WebsService_Url" value="http://ma1-lab.lab1.domain.com/v1.2.3.4

how to perform coordinates affine transformation using python? part 2

柔情痞子 提交于 2019-11-27 15:00:28
问题 I have same problem as described here: how to perform coordinates affine transformation using python? I was trying to use method described but some reason I will get error messages. Changes I made to code was to replace primary system and secondary system points. I created secondary coordinate points by using different origo. In real case for which I am studying this topic will have some errors when measuring the coordinates. primary_system1 = (40.0, 1160.0, 0.0) primary_system2 = (40.0, 40.0

How to add config transformations for a custom config file in Visual Studio?

。_饼干妹妹 提交于 2019-11-27 14:38:37
The project I am working on involves reading a lot of service endpoints (url) from a config file. Since the list would be quite large I decided to keep them in a custom config file to keep my web.config clean and small. I included the custom section to my web as below: <mySection configSource="myConfig.config" /> I works perfectly fine. But the problem of transformation appears during the deployment of the project to different environments. I have three web.config files: Web.config Web.Uat.config Web.Release.config While the transformation web.config works, the transformations for custom

Android OpenCV getPerspectiveTransform and warpPerspective

為{幸葍}努か 提交于 2019-11-27 14:11:39
问题 I am a bit confused with the parameters of getPerspectiveTransform as I cannot see a proper image. Here is my code. The original_image variable is the image that contains a square object (and some others) that I want to crop and create a new image (something like this Android OpenCV Find Largest Square or Rectangle). The variables p1, p2, p3, and p4 are the coordinates of the corners of the largest square/rectangle in the image. p1 is the upper left, p2 is the upper right, p3 is the lower

How do I transform a List<T> into a DataSet?

与世无争的帅哥 提交于 2019-11-27 11:23:36
Given a list of objects, I am needing to transform it into a dataset where each item in the list is represented by a row and each property is a column in the row. This DataSet will then be passed to an Aspose.Cells function in order to create an Excel document as a report. Say I have the following: public class Record { public int ID { get; set; } public bool Status { get; set; } public string Message { get; set; } } Given a List records, how do I transform it into a DataSet as follows: ID Status Message 1 true "message" 2 false "message2" 3 true "message3" ... At the moment the only thing I

How does transforming points with a transformMatrix work in fabricJS?

£可爱£侵袭症+ 提交于 2019-11-27 08:59:51
I'm trying to place points (made via fabric.Circle ) on the corners of a fabric.Polygon . The polygon may be moved, scaled or rotated by the user. However, after each modification I want to have the new coordinates of the polygon to place my circles there. While digging deeper into this topic I found this great explanation of transformation matrices. I thought it's the perfect solution for what I want to achieve. But as you can see in the Fiddle, my points are always way off my polygon. As I'm not firm with geometric transformation etc. I hope someone can find my error and tell me what I'm

What are the maths behind 3D billboard sprites? (was: 3D transformation matrix to 2D matrix)

試著忘記壹切 提交于 2019-11-27 08:27:21
问题 I have a 3D point in space. The point's exact orientation/position is expressed through a 4x4 transformation matrix. I want to draw a billboard (3D Sprite) to this point. I know the projected position (i.e. 3D->2D) of the point; the billboard is facing the camera so that's very helpful too. What I don't know is the scaling that the billboard should have! To make things more complex, the 4x4 matrix may have all sorts of transformations: 3D rotation, 3D scaling, 3D transposition. Assume that