Ask Your Question

AmirKK's profile - activity

2021-04-12 02:56:29 -0600 received badge  Popular Question (source)
2017-01-20 05:55:45 -0600 commented answer How to increase warpPerspective Or warpAffine precision?

The problem is that I would like to do it not only for translation but also for rotation and scaling (with respect to image center) and it would make it problematic to handle all of these transformations. Also, my images are large enough which if I transform them by looping pixel by pixel it would take a long time.

2017-01-19 14:39:20 -0600 commented answer How to increase warpPerspective Or warpAffine precision?

It is INTER_BITS and changing it to maximum 10 (higher than 10 the compiling crashes due to exception error) increase the accuracy only a little bit.

2017-01-19 14:04:05 -0600 commented question How to increase warpPerspective Or warpAffine precision?

You see. Then, What do you think to do as a solution for this kind of problem? and knowing that these small images are only for test, my real images are quite large.

2017-01-19 12:07:01 -0600 received badge  Student (source)
2017-01-19 09:55:50 -0600 commented question How to increase warpPerspective Or warpAffine precision?

My image pixel types are CV_64F not CV_32F, consider the source image is the following: [93.0, 0.0], then translation in column with 0.1 should give me [93.0 - 9.3, 9.3], right? but it gives me the following answer: [84.28125, 8.71875]!

This is the way I create for instance one of my images:

cv::Mat srcImg = (cv::Mat_<double>(3, 3) << 0.0, 0.0, 0.0,
                                  0.0, 256.0, 0.0,
                                  0.0, 0.0, 0.0);

And when I translate in row by 0.1 this is the result:

[0.0, 0.0, 0.0,
 0.0, 232.0, 0.0,
 0.0, 24.0, 0.0]
Which is wrong!
2017-01-19 09:01:49 -0600 asked a question How to increase warpPerspective Or warpAffine precision?

I would like to transform my images with rotation degree of 0.001 degree, and translate them with 0.0001 pixel in row or column. The problem with this library is that it cannot manage this kind of tiny transformation steps and the result is that the source and transformed images are identical with this tiny transformations!

Is there any way to increase this precision such that I could get correct and different images when I rotate them and translate them by 0.001 degree and 0.0001 pixels respectively ?

One approach is changing the interpolation mask size which is defined by "INTER_BITS" inside imgproc.hpp file and compiling opencv library from scratch, but it could only increase the precision only a little bit.