Scale rows and/or cols of Mat

asked 2015-02-23 09:05:23 -0600

I am using OpenCV 3.0.0 beta and I'm wondering if there is an OpenCV method that scales individual rows and cols, or if there are methods that will help me to do this.

What I am trying to do is a 3D rotation on a 2D image in a Mat by scaling the rows or columns according to a slope. This will give it perspective.

I'm creating the fastest possible algorithms, so speed is key here, and I would prefer to use only OpenCV methods, no Java as Java would slow down the process. I'm not saying that I can't use Java, I'm saying I don't want to use anything intense like loops in Java for the purpose of this project.

Above all: is there an OpenCV method that scales individual rows and cols, or are there methods that will help me to do this?

edit retag flag offensive close merge delete

Comments

1

have a look at warpPerspective

berak gravatar imageberak ( 2015-02-23 09:10:21 -0600 )edit

@berak scales rows and cols one by one

LinkTheProgrammer gravatar imageLinkTheProgrammer ( 2015-02-23 09:12:34 -0600 )edit
2

^^ yes, got it later ;)

still better do something on a whole Mat at a time, like warpAffine/warpPerspective

berak gravatar imageberak ( 2015-02-23 09:17:49 -0600 )edit

Thank you @berak.

LinkTheProgrammer gravatar imageLinkTheProgrammer ( 2015-02-23 09:18:23 -0600 )edit