03 CvConvertImage, CV_CVTIMG_FLIP , 上下顛倒

openCV 的圖片上下顛倒

Xcode
 

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <string.h>
#include <fstream>


using namespace cv ;
using namespace std ;
int main() {
    cv::Mat image = cv::imread("/Users/powenko/Desktop/apple.png");
    if(image.data!=NULL){
        cv::namedWindow("Image") ;
        cv::imshow("Image", image) ;
        
        Mat image2;
        //cv::cvtColor(image, gray_image,CV_BGR2GRAY);
    
        //cv::cvCon
         cv::flip(image,image2,1);
        
        
        cv::imshow("Result", image2) ;
        cv::waitKey() ;
    }
    return 0;
}

1-14
screen-shot-2016-11-26-at-8-47-05-pm

OpenCV
CH01 簡介CH02 OpenCV APICH03 繪圖CH04 應用範例CH06 haarcascadesCH06 surf和siftCH07 OCRCH09 FaceCH5 輪廓(findContours、drawContours)