What is the opencv equivalent to matlab's fliplr()?

Yonatan Simson

My solution is:

cv::Mat FlipLR(const cv::Mat& inImg)
{
    //create flipped image from Left to right
    cv::Mat outImg(inImg.size(), inImg.type());
    cv::Mat_<double> FlipMatrix(2, 3);
    FlipMatrix << -1, 0, inImg.cols - 1, 
        0, 1, 0; 

    cv::warpAffine( inImg, outImg, FlipMatrix, outImg.size(), cv::INTER_NEAREST );

    return outImg;
}

Is there a more efficient way to do this?

a-Jays

Yes, cv::flip().

Although a simple search through the docs would've given you this.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

what is the equivalent function of matlab 'fix' in opencv?

From Dev

What is python's equivalent of Matlab's ranksum?

From Dev

What is the MATLAB equivalent of Excel's NORMSDIST function?

From Dev

What is the R equivalent of matlab's csaps()

From Dev

What is the MATLAB equivalent of Excel's NORMSDIST function?

From Dev

What is the equivalent of matlab's wkeep in Python?

From Dev

OpenCV equivalent for thresholding in MATLAB

From Dev

OpenCV equivalent for thresholding in MATLAB

From Dev

Equivalent function of Matlab's filter2 in OpenCV

From Dev

Is there any function equivalent to Matlab's imadjust in OpenCV with C++?

From Dev

Is there any function equivalent to Matlab's imadjust in OpenCV with C++?

From Dev

What is the equivalent of imagesc in OpenCV

From Dev

What is the equivalent of MATLAB?

From Dev

What is the equivalent of Mathematica's RegionPlot3D[] in MATLAB?

From Dev

What is the equivalent of matlab's smooth3 function in python?

From Dev

what is the difference between opencv's and matlab's bicubic algorithm?

From Dev

Equivalent of MATLAB's hold on

From Dev

Equivalent of MATLAB's hold on

From Dev

What is the equivalent to a Matlab cell array?

From Dev

Convert Opencv hsv equivalent to Matlab Hsv

From Dev

Matlab's diff in OpenCV

From Java

Numpy equivalent to MATLAB's hist

From Dev

Matlab equivalent to Mathematica's FindInstance

From Dev

Julia equivalent of Matlab's pause?

From Dev

NumPy equivalent of Matlab's magic()

From Dev

What is the equivalent of CreateMemStorage() in OpenCV3 in python?

From Dev

What is the equivalent of Matlab's cwt() in Python? (continuous 1-D wavelet transform)

From Dev

What is the equivalent of Matlab's cwt() in Python? (continuous 1-D wavelet transform)

From Dev

Julia's equivalent of MATLAB's `sym`?

Related Related

  1. 1

    what is the equivalent function of matlab 'fix' in opencv?

  2. 2

    What is python's equivalent of Matlab's ranksum?

  3. 3

    What is the MATLAB equivalent of Excel's NORMSDIST function?

  4. 4

    What is the R equivalent of matlab's csaps()

  5. 5

    What is the MATLAB equivalent of Excel's NORMSDIST function?

  6. 6

    What is the equivalent of matlab's wkeep in Python?

  7. 7

    OpenCV equivalent for thresholding in MATLAB

  8. 8

    OpenCV equivalent for thresholding in MATLAB

  9. 9

    Equivalent function of Matlab's filter2 in OpenCV

  10. 10

    Is there any function equivalent to Matlab's imadjust in OpenCV with C++?

  11. 11

    Is there any function equivalent to Matlab's imadjust in OpenCV with C++?

  12. 12

    What is the equivalent of imagesc in OpenCV

  13. 13

    What is the equivalent of MATLAB?

  14. 14

    What is the equivalent of Mathematica's RegionPlot3D[] in MATLAB?

  15. 15

    What is the equivalent of matlab's smooth3 function in python?

  16. 16

    what is the difference between opencv's and matlab's bicubic algorithm?

  17. 17

    Equivalent of MATLAB's hold on

  18. 18

    Equivalent of MATLAB's hold on

  19. 19

    What is the equivalent to a Matlab cell array?

  20. 20

    Convert Opencv hsv equivalent to Matlab Hsv

  21. 21

    Matlab's diff in OpenCV

  22. 22

    Numpy equivalent to MATLAB's hist

  23. 23

    Matlab equivalent to Mathematica's FindInstance

  24. 24

    Julia equivalent of Matlab's pause?

  25. 25

    NumPy equivalent of Matlab's magic()

  26. 26

    What is the equivalent of CreateMemStorage() in OpenCV3 in python?

  27. 27

    What is the equivalent of Matlab's cwt() in Python? (continuous 1-D wavelet transform)

  28. 28

    What is the equivalent of Matlab's cwt() in Python? (continuous 1-D wavelet transform)

  29. 29

    Julia's equivalent of MATLAB's `sym`?

HotTag

Archive