Ask Your Question

pkohout's profile - activity

2020-12-02 21:38:08 -0600 received badge  Notable Question (source)
2019-12-16 01:11:44 -0600 received badge  Notable Question (source)
2019-10-29 10:02:02 -0600 received badge  Popular Question (source)
2017-05-03 04:02:49 -0600 received badge  Popular Question (source)
2014-08-13 03:35:28 -0600 asked a question How to Invert 3x2 Transformation Matrix

Hi, i am having trouble inveting an 3x2 Transformation Matrix. If my original transformation is rotation with +5°, i want the inverse, which rotation is -5°. Then i want to transform some point with the new inverse Matrix. If I use

    cv::Mat inverse;
    inverse = H.inv(cv::DECOMP_SVD);

I get back a matrxi, but it is 2x3 instead of 3x2, and then i cannt use cv::transform anymore because it gets a SIGABRT.

What am i doing wrong ?

regard Peter

2014-06-20 04:47:14 -0600 commented answer Calculate quality of a transformaion

thanks for the answers. Yes we are using Keypoints to get the transformation. So you mean i have the transformation from Image A to B, then I take the Keypoint from image B, transform it with the Inverse Matrix and then compare it to the Keypoints i got in Image A ?

2014-06-20 04:07:52 -0600 asked a question Calculate quality of a transformaion


i am using OpenCV to calculate a transformation (Rotation + Translation) between two 2D greyscale (pgm) pictures. Now we are looking for a way to calculate how good the transformation we got is. Is there something available in OpenCV to rate the resulting transformation matrix ? Or does somebody know some algorithm to achive this ?

2013-08-28 08:26:54 -0600 asked a question estimateRigidTransform returns scale 0


i use estimateRigidTransform, in most cases it works, but sometimes it return a 0 scaleX/Y and transX/Y. Thats my code to calce the values.

Mat M = estimateRigid(...);

transx =<double>(0,2);

transy =<double>(1,2);

scalex = sqrt(pow(<double>(0,0),2)+pow(<double>(0,1),2));

scaley = sqrt(pow(<double>(1,0),2)+pow(<double>(1,1),2));

what doues it mean if the method returns all 0 ? I thought if it find no transfrom the Matrix is empty.

2013-08-27 00:49:13 -0600 asked a question extract shear from a 2x3 Matrix


i have got a 2x3 transformation matrix, and have already calculated translationX/Y scaleX/Y and rotation, but i also need do calculate the shear of the matrix, does any one know how to extract it ? All i found in on the internet just looks at the other 5 values.

2013-08-21 04:54:22 -0600 received badge  Scholar (source)
2013-08-21 04:54:19 -0600 received badge  Supporter (source)
2013-08-20 07:01:49 -0600 received badge  Student (source)
2013-08-20 03:36:56 -0600 asked a question 2x3 Transformation Matrix


i would like to know how to read the information of a 2x3 Transformation Matrix. If i am right, it contains the rotation, the translation x/y and the scale x/y. But what is the sixth value used for ?

I need to read the rotation from the matrix in RAD or DEG.

I hope someone can explain me the 2x3 Transformation Matrix a little more detailed.

2013-08-20 01:09:47 -0600 commented answer How do I install openCV to work with ROS

hope it is now more understandable

2013-08-19 01:23:16 -0600 received badge  Editor (source)
2013-08-19 01:22:53 -0600 answered a question How do I install openCV to work with ROS

Hi, i have accomplished to use openCV in ROS.

I have installed opencv [],not sure if it is necesarry i had it on the pc before i intalled ros.

The vision_opencv is a "bridge" to use opencv with ros, for further information look and

And of course you need to tell ros that the package needs opencv to run/compile. So you need to include it into your CMakeList.txt (here i mean the CMakeList.txt in your package):

find_package(OpenCV REQUIRED)

target_link_libaries(your_node ${OpenCV_LIBS})

your_node is just a placeholder, there should be the name of your library or execution. If you are not so familiar with CMake, read on about the target_link_libaries/find_package macro. And you need to create a dependenc in your manifest.xml

<rosdep name="opencv2"/>

hope that helps you

2013-08-13 08:33:06 -0600 asked a question warpAffine without Interpolation

Hi, what flags do i need by cv::warpAffine to do no interpolation ? Or is there a way to mark the "outliners" in a special color ?

2013-08-12 08:37:08 -0600 asked a question affine transform coordinate


how can I transform a Coordinate (X/Y) with a 3x2 Transform Matrix?

For example, I have an image (img1) of 2048x2048 px, transform it (apply some rotation and translation) and then get img2. Now I want to know, where the pixel, which was at the point P(100/150) in img1, is in img2?

It does not have to be totally accurate, some pixels off is no problem. Is there any method to achieve this in OpenCV ?