Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to convert cv::Mat to ofImage in ofxCv?

$
0
0

@bemoregt wrote:

ofApp.h

...
ofImage gray;

ofApp.cpp
//------------------
using namespace ofxCv;
using namespace cv;

//-------
void ofApp::setup() {

cv::Mat img = cv::imread("/Users/kerbal/Documents/c1.jpg");

toOf(img, gray);
gray.update();

}

//----------
void ofApp::update() {
gray.draw(10,10);
}


My Code is here.

But Nothing is shown in window. )-:

How can I convert cv::Mat to ofImage ?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles