Questions tagged [affinetransform]

An affine transform is a special 3x3 matrix used to apply translation, rotation, shearing or skew, and scaling to coordinate systems in two dimensional graphic contexts.

affinetransform
Filter by
Sorted by
Tagged with
0 votes
1 answer
67 views

Extracting rotational-free translational information out of transformation matrix?

I use SIFT feature detector and need the angle AND the center translation of two rigid2D transformed images. Therefor I want to extract the information directly out of the transformation matrix. ...
TMul's user avatar
  • 1
0 votes
1 answer
33 views

Correct matrix multiplication and 2D affine mapping using scipy

I have two sets of 2D data A and B I have to assume that there is a 2×2 matrix M and a 2x1 column vector c such that: B = M*A + c + e With e being the Gaussian error (mean of 0 and variance of sigma^2)...
yuxy's user avatar
  • 19
0 votes
2 answers
59 views

Calculating center of rotation from Affine2D transformation matrix

I have two 2D images, where the second one undergoes translation and rotation, resulting the coordinates (xn, yn) in the first picture to move to (xn', yn'). I have no problem obtaining the rotation ...
ZeroX Al-Attas's user avatar
1 vote
1 answer
49 views

2D affine mapping using scipy

I have two sets of 2D data A and B. I have to assume that there is a 2×2 matrix M and a 2x1 column vector c such that: B = M*A + c + e With e being the gaussian error (mean of 0 and variance of sigma^...
yuxy's user avatar
  • 19
0 votes
0 answers
22 views

Oblique text: Creating NSFont with a textTransform changes the size to 1 pt

I need to correctly display text from older documents in an NSTextView. They used italics to indicate important info, even on fonts that don't have a dedicated italic face. I tried NSAttributedString'...
uliwitness's user avatar
  • 8,674
0 votes
0 answers
21 views

Why applying acpc alignment in MATLAB and brainlife results in different affine of the acpc aligned MRI images?

I have applied acpc alignment of a set of MRI images in MATLAB (https://github.com/vistalab/vistasoft/wiki/ACPC-alignment) and in brainlife(https://brainlife.io/app/5b96d5ed059cf9002719250b with ...
NastaranTH's user avatar
0 votes
0 answers
49 views

Panning, Zooming and Relative Coordinates in Java Swing

I'm writing a small game in which you can pan (by dragging the mouse) and zoom (by scrolling) and click an image. The zoom should function as in a Maps-Like Program with the pixel under the cursor ...
Dromlius's user avatar
0 votes
0 answers
26 views

What is the difference between using python Pillow's ImageOps mirror and flip options, and doing an affine transformation?

I'm trying to reflect and compare some images, for example, if I reflect image A, is it equivalent to image B. As of now I am using Pillow's mirror and flip options to make the comparison. I am ...
Sanglang's user avatar
1 vote
1 answer
99 views

How to obtain a 2d transformation matrix from two pairs of points?

OpenCV provides: getRotationMatrix2D to get a 2x3 transformation matrix (rotation, scale, shift) defined by center, angle and scale getAffineTransform to get a 2x3 transformation matrix (rotation, ...
Tobias Hermann's user avatar
0 votes
0 answers
40 views

How to find 'alpha' of the Rotation matrix of a binarized image? in Python

I have an image of a LTCC (circuit carrier) board with VIAs(which can be detected as circles in our image). And I have been able to detect the four reference circles in the image and store the four ...
Erfan's user avatar
  • 1
-1 votes
1 answer
66 views

Register image onto a smaller, partial, image but with some common features

I want to transform images of written text (taken by a mobile phone camera with different 3D rotation, scale etc.) so that they look "orthogonal" (by this I mean as if you read them from a ...
bliako's user avatar
  • 1,041
0 votes
0 answers
27 views

Align apex of one triangle with base of another

I am having difficulty translating the logic of what I want to do into programming math (geometry). I created this function to generate coordinates for triangles using tutorials but I am having one ...
jadewantsfood90's user avatar
0 votes
0 answers
39 views

Affine Stitching Image As Step By Step

#include "header.h" #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/features2d.hpp" #...
Tommy's user avatar
  • 1
0 votes
0 answers
23 views

Significant parameters for a 2-D Affine transformation in Photogrammetry

In the context of photogrammetry, if you are given the parameters for a 2-D Affine transformation, how would you determine which parameters are significant? My intuition suggests that you would ...
SnakeyB's user avatar
0 votes
0 answers
16 views

Affine Model for inflation expectations

How would I code for the affine model to extract pure inflation expectations from data on nominal and real yields of bonds? I want to extract the risk premium and convexity of risk preferences from ...
Alex's user avatar
  • 1
0 votes
1 answer
131 views

Image transformation in OpenCV and Qt C++

I have set of images taken from right side of object like image1. I need to rotate it about vertical axis and change it tobe like image2. Is that affine transformation useful to convert image1 to ...
Mehran's user avatar
  • 317
0 votes
0 answers
62 views

Python code not rotating and scaling image in affine transformations as expected

Problem: I am trying to rotate and scale an image using the following Python code: """ img = matplotlib.pyplot.imread('letterR.jpg') T = np.array([[0, 2, 0], ...
invalid youser's user avatar
2 votes
0 answers
58 views

Override google maps api default projection?

I have a list of lat/lon data that forms a path. The data was obtained using a GPS device from a vehicle on a race track. When I plot this using Google maps JavaScript API (satellite map), it doesn't ...
driven1983's user avatar
0 votes
1 answer
44 views

What is the application order of transforms for QML Item?

A QML Item may have several transforms in several forms: translation via x and y properties, rotaion via rotation properties group, scaling via scale properties group, and finally it has the transform ...
dev65's user avatar
  • 1,480
0 votes
0 answers
44 views

Affine transformation from 2D to 3D using SciPy leads to empty arrays

Using scipy.ndimage.affine_transform, I am trying to apply an affine transformation on a 3D array with one degenerate dimension, e.g. with shape (10, 1, 10), and get a non-degenerate 3D output shape, ...
Biblot's user avatar
  • 705
0 votes
0 answers
15 views

How do I correct camera angle and something like homography

I need to transform some image planes to make them parallel to the camera lens. Now the images are inclined. I have looked into homography and affine transformation and got some idea. Just wanted to ...
banikr's user avatar
  • 65
0 votes
1 answer
52 views

Incorrect Position and Angle of Arrowhead with AffineTransform

I have written a test program using AffineTransform to draw an arrowhead. The program takes the center of the window as the starting point of the arrowhead and the mouse position as the ending point. ...
Jacky's user avatar
  • 45
0 votes
0 answers
266 views

Affine transformation using cv2 and torch

def opencv_downsampling(img, out_size, translation=(0.0, 0.0), rotation=0.0, shear=(0.0, 0.0), scale=(1.0, 1.0), interpolation=cv2.INTER_LINEAR): h, w = img.shape[:2] rotx = w / 2 - 0.5 ...
SW Jung's user avatar
0 votes
1 answer
86 views

How to improved the performance of a 3D resampling with better used of subregion

I have a 3D array of shape (x, y, z) filled with zeros, except for a specific index along the z-axis where it contains non-zero values. I would like to perform a resampling operation to change its ...
Brogly's user avatar
  • 23
0 votes
0 answers
19 views

Can scipy ndimage affine_transform increase intensity range?

We were doing some experiment on scipy.ndimage.affine_transform From our understanding, it is a linear transformation through spline interpolation method. Thus, it could reduce the overall image ...
jongsung park's user avatar
0 votes
0 answers
49 views

How to convert 3 cardiac Image Series conversion to single nifti volume file

I have a set of DICOM cardiac images with 14 short axis slices, 3 (3 chamber view slices), and 3 (4 chamber view) slice images respectively. I am trying to create a single nifti file that combines ...
Owen Baenen's user avatar
0 votes
0 answers
287 views

How to control UV mapping distortion

The illustration below shows how I expect the UV mapping to be applying the texture and how it is really being applied. This was a big surprise to me, my conclusion was if I could draw faces with four ...
Severin's user avatar
  • 55
1 vote
0 answers
90 views

How to warp or project a point cloud (semi-landmarks) from a template onto a target object in python?

For a better understanding see the next figure. left: template, right: target Given are a template point cloud and a target point cloud. The template point cloud has initially four (red) fixed points (...
blackxmamba's user avatar
-2 votes
1 answer
79 views

AffineTransform translation is not keeping image centered when zooming

The code opens a pdf and renders a page as a bufferedImage. The paintComponent() of my JPanel is overridden to use an AffineTransform to scale the bufferedImage and drawRenderedImage(). @Override ...
Ozakriid's user avatar
0 votes
1 answer
33 views

Using perspective projection yields incorrect results

I use gl-matrix JS library to transform points in 3d. When I use model-view matrix (lookAt), the transformed points make sense. But when I add perspective projection on top of that, the resulting ...
Jakub M.'s user avatar
  • 33.3k
0 votes
1 answer
44 views

Revolve image around center (blurry and not exactly at center)

I'm trying to revolve a BufferedImage around its center. Here's my Code: frame = new JFrame(); GridBagLayout gLayout = new GridBagLayout(); frame.getContentPane().setLayout(gLayout); lbIm1 = new ...
RichS's user avatar
  • 117
2 votes
0 answers
159 views

numpy qr factorization problems

I'm trying to extract rotation matrix from affine transform matrix (via QR decomposition), but it gives me wrong rotations. After applying rotation vectors should have zero angle between them. I have ...
иван зуйков's user avatar
0 votes
1 answer
383 views

Map corresponding points between Delaunay triangles

I'm trying to morph two images of faces using an inverse warp. I have the Delaunay triangles for both images as well as all transformation matrices for all pairs of corresponding triangles. I have ...
darryl247's user avatar
0 votes
1 answer
230 views

How to pad edge with black color (0 value) in affine registration using SimpleITK

I used SimpleITK to do affine registration and find that after transform the moving image was scaled smaller than its original size while the edge was padded with gray color. How to pad the edge with ...
Chaoye Jin's user avatar
2 votes
1 answer
475 views

Match in Python a LARGE set of (x, y) points to another set with outliers

I have two large sets of (x, y) points and I want to associate in Python each point of one set with "the corresponding point" of the other. The second set can also contain outliers, i.e. ...
exsurge-domine's user avatar
2 votes
1 answer
136 views

Align X and Y coordinates of face landmarks in R

here is a reprex example (sorry it's a bit long but needed to demonstrate the issue ) reprex<- structure(list(lanmark_id = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...
Myriad's user avatar
  • 341
0 votes
2 answers
89 views

2D basic transformation combination

I have a 2D transformation problem in OpenGL. My program draws two letters on screen and, by pressing assigned keys, letters have to move up (GLUT_KEY_UP) down (GLUT_KEY_DOWN) left (GLUT_KEY_LEFT) ...
meinhardis's user avatar
1 vote
0 answers
236 views

PixiJS: Affine projection vs bilinear one

Let's say there is an arbitrary composite shape in PixiJS: I need to project a texture onto it by some kind of a grid warp in a way, so the result would be: I have tried to do it via PIXI....
toowren's user avatar
  • 83
2 votes
0 answers
517 views

Why opencv resize and corresponding warpAffine methods produce different results?

I did some refactoring and decided to replace several steps like shift image + resize with corresponding warpAffine methods. I noticed some changes in the final result and started to analyze it. ...
Stanislav's user avatar
  • 581
0 votes
0 answers
275 views

Matching and cropping 2 slightly shifted photos of an object

There's some 2D object that I have 2 photos of. I want to find their difference, but can't since they were captured with slight shift compared to each other. Thus, each picture is almost identical to ...
Roee's user avatar
  • 3
1 vote
1 answer
358 views

how can i put (keras/apply_affine_transform) to work ? (theta)

I'm trying to rotate an image with keras affine tranformation (theta). the output i'm reveiving is: output here import skimage.io as io import matplotlib.pyplot as plt import numpy as np image = ...
Vinícius Porto's user avatar
3 votes
0 answers
527 views

how to get coordinates of rectangle vertices inside another rectangle?

i know this is a simple math, but I stuck. i'm using c++ opencv for image processing. I have two rectangles, and bounding box inside both of it. the problem is to get coordinates of this bounding box ...
Archie's user avatar
  • 39
0 votes
0 answers
384 views

affine transform (shear) calculate output shape

I want to apply an affine transformation (using scipy ndimage.affine_transform). In particular I want to apply a shear in both dimensions so my transform matrix looks something like this: ...
GeraldFitz's user avatar
0 votes
0 answers
311 views

How can I use Graphics and Affinetransform draw a perspective picture

I want draw a picture with Java. And I want rotate this picture along the X-axis or Y-axis to make the picture perspective. It can make the image three-dimensional. Do you know the function '3D ...
C.K.Jun's user avatar
3 votes
1 answer
385 views

Apply affine transformation to value

I use TF.js to run a key-point prediction model for an input image in browser. And I'd like to apply affine transformation to the value of every keypoint using TF.js and webgl backend. For the value ...
ZennKa's user avatar
  • 65
2 votes
0 answers
330 views

How can I rotate a 2d image using a target image, landmark coordinates, the least squares approach, and a rotation matrix?

I have two 2d images, one is the source image and the other is a target image; I need to rotate the source image to match the target image using python (scikit & numpy). I have 3 landmark ...
katcat's user avatar
  • 43
4 votes
2 answers
805 views

How to factor the ITK CenterOfRotationPoint in an affine transformation matrix?

We are using the registration algorithm of ITK but we only want the affine transformation matrix and not directly apply the registration. In a previous issues we already solved a misunderstanding ...
Spenhouet's user avatar
  • 6,871
6 votes
3 answers
1k views

Padding scipy affine_transform output to show non-overlapping regions of transformed images

I have source (src) image(s) I wish to align to a destination (dst) image using an Affine Transformation whilst retaining the full extent of both images during alignment (even the non-overlapping ...
Jdog's user avatar
  • 10.4k
2 votes
2 answers
2k views

How to get transformation affine from ITK registration?

Given 3D MRI scans A, B, and C I want to perform an affine (co)registration of B onto A, take the transformation affine matrix of the registration and apply it on C. My problem is that the affine ...
Spenhouet's user avatar
  • 6,871
1 vote
0 answers
237 views

Image shearing OpenCV CPP

I'm trying to use cv::warpAffine to perform image transformations, but I have an issue. Note: I already saw questions/46998895 and it works well too, but with no interpolation and I wanted to use ...
Pommepomme's user avatar

1
2 3 4 5
12