transformation

convert xml to soap request using xslt transformation in mule

不羁岁月 提交于 2019-12-04 22:24:38
How to convert xml to soap message using XSLT in mule? I am using mule community addition so I can't use mule datamapper. Can any one help me how to convert xml to soap message using XSLT tranformation? I have below xml: <file> <header> <documentType>CEN_ORD</documentType> <version>1.0</version> <createDate>01/01/15 02:11</createDate> <originator>IKEA</originator> <timeZone>PST</timeZone> <dateFormat>MM/dd/yy HH:mm</dateFormat> <currencyFormat>USD</currencyFormat> <weightUnits>lbs</weightUnits> <linearUnits>meter</linearUnits> <priceBuCode>158</priceBuCode> <routeBuCode>158</routeBuCode>

Horizontal Transformation of Array (2D)

别等时光非礼了梦想. 提交于 2019-12-04 20:49:21
It's a simple matter of flipping an image horizontally and/or vertically. The premise is that given a 2D integer array that was created from importing a picture, I must create a method with a int[][] param and horizontally flip it before returning void. The syntax is below: public static void horizontalFlip(int[][] imgArray) { int temp; for (int i = 0; i < imgArray.length; i++) { for (int j = 0; j < imgArray[i].length / 2; j++) { temp = imgArray[i][j]; imgArray[i][j] = imgArray[imgArray.length - 1 - i][j]; imgArray[imgArray.length - 1 - i][j] = temp; } } } I use imgArray as the array param and

convert an opencv affine matrix to CGAffineTransform

雨燕双飞 提交于 2019-12-04 20:23:04
I'd like to take an affine matrix that I have from OpenCV: Mat T = getAffineTransform(src_pt, dst_pt); and then convert it into a CGAffineTransform for use in Core Graphics/Objective-C/iOS. ( CGAffineTransform docs ) I've tried: CGAffineTransform t = CGAffineTransformIdentity; t.a = T.at<float>(0,0); t.b = T.at<float>(0,1); t.c = T.at<float>(1,0); t.d = T.at<float>(1,1); t.tx = T.at<float>(0,2); t.ty = T.at<float>(1,2); This works fine for x and y translations, but NOT if there is any rotation in the matrix. Something seems to be missing since the resulting image seems to be skewed strangely.

CTM transforms vs Affine Transforms in iOS (for translate, rotate, scale)

房东的猫 提交于 2019-12-04 19:10:38
I read through the Transforms documentation in the Quartz 2D Programming Guide. In it there appears to be two ways to make transformations. One way is through modifying the Current Transformation Matrix (CTM). It has methods like the following: CGContextTranslateCTM CGContextRotateCTM CGContextScaleCTM The other way is to use Affine transforms. It has methods like the following: CGAffineTransformTranslate CGAffineTransformRotate CGAffineTransformScale The docs state The affine transform functions available in Quartz operate on matrices, not on the CTM. But I don't understand how that affects

How to reformat XML with group-adjacent (XSLT)

孤者浪人 提交于 2019-12-04 18:34:14
I'm new in this XSLT-thing and I can't figure out how to this: This is a snippet from the xml i start with: <Article> <Bullettext>10,00 </Bullettext> <Bullettext>8,00 </Bullettext> </Article> <Article> <something>some text</something> </Article> <Article> <Corpsdetexte>Bulgaria</Corpsdetexte> <Bullettext>15,0 </Bullettext> <Bullettext>10,0 </Bullettext> </Article> ` This is what i want the output to be: <LIST> <ITEM>12,00 </ITEM> <ITEM>10,00 </ITEM> <ITEM>8,00 </ITEM> </LIST> <P> <something>some text</something> </P> <P> <Corpsdetexte>Bulgaria</Corpsdetexte> </P> <LIST> <ITEM>15,0 </ITEM>

How can I make my n-resize display correctly?

此生再无相见时 提交于 2019-12-04 18:13:02
Here is modified code originally tooken from this post . Resizing the rectangle on the Right middle, bottom middle and right bottom control point is fine as I don't need to change the translate coordinates in order to make the resize work. Now my problem as you can see is that my resizing on the top middle (same for the left middle, left bottom...) of my rectangle when the rotate angle is different from 0 doesn't work as it visually changes position when I resize it. I really don't know how to change that so any help is highly appreciated. note: change angle to 0 in the input field and you'll

Trying to derive a 2D transformation matrix using only the images

和自甴很熟 提交于 2019-12-04 17:29:36
I dunno if this should go in a Math forum or a Programming forums, but I'll post it in both and see where I get. I have two computer images... one of them is an "original" image (a large TIF file). The other one is a transformed version of the original image... it's been rotated, sheared and translated in a software program. I need to do some work on the transformed image, but I need the (x-y) coordinates of each pixel in the original image to finish my calculations. I know that the image was rotated and sheared with a 3x3 Transformation matrix. If I had the matrix, I could derive the second

Robustly estimate Polynomial geometric transformation with scikit-image and RANSAC

心不动则不痛 提交于 2019-12-04 17:02:53
I would like to robustly estimate a polynomial geometric transform with scikit-image skimage.transform and skimage.measure.ransac The ransack documentation gives a very nice example of how to do exactly that but with a Similarity Transform. Here is how it goes: from skimage.transform import SimilarityTransform from skimage.measure import ransac model, inliers = ransac((src, dst), SimilarityTransform, 2, 10) I need to use skimage.transform.PolynomialTransform instead of SimilarityTransform, and I need to be able to specify the polynomial order. But the RANSAC call takes as input the

2D numpy array- check to see if all adjacent terms are equal

故事扮演 提交于 2019-12-04 15:50:54
I am starting with a nxm boolean array, that defines regions- true if it is in the region, false if not. For example: r = np.array([[ 0, 0, 1, 1, 1], [ 0, 1, 1, 0, 0], [ 0, 1, 1, 1, 0], [ 1, 1, 1, 0, 0], [ 1, 1, 0, 0, 0]]) The line between regions can be defined as an n-1 x m-1 array, which would represent a 'point' in between each set of four values. If all 4 surrounding values are the same, you are not on the edge between regions. If any of the 4 values are different, you are. For r above: l = np.array([[ 1, 1, 1, 1], [ 1, 0, 1, 1], [ 1, 0, 1, 1], [ 0, 1, 1, 0]]) Any thoughts on how this can

Finding transformation between two frames

人盡茶涼 提交于 2019-12-04 15:35:11
I have two consecutive frames from a video feed and I detect the keypoints using the FAST algorithm for both of them. I match the keypoints using the sum of squared difference's method (SSD). So basically I have matched keypoints between the two frames. Now I want to calculate the affine transformation (scale + rotation + translation ) between the two frames from the set of matched keypoints. I know how to calculate affine transformation from a pair of two points. My question is how can we calculate it for more than two or three points? I know I have to use least median square method but I'm