最終更新:2018-07-05 (木) 01:32:06 (2084d)
openFrameworks/画像
Top / openFrameworks / 画像
型
型 概要 継承 ofTexture GPU側の画像 →ofBaseDraws ofImage ofの画像 →ofBaseImage→ofBaseImage<T>?→ofAbstractImage→ofBaseDraws ofxCvImage →ofBaseImage→ofBaseImage<T>?→ofAbstractImage→ofBaseDraws ofPixels CPU側の画像 →ofPixels_<T>?
変換
ofImageをofxCvのcv::Matとして扱う
- Either use Mat mat = toCv(img); to treat the ofImage as a Mat, modify the mat, then img.update() to upload the modified pixels to the GPU.
- もしくはtoOf(mat, img)
ofxCv
toCv
戻り値 引数 cv::Mat toCv(cv::Mat& mat) cv::Mat toCv(ofMesh& mesh); cv::Point2f? toCv(ofVec2f? vec); cv::Point3f? toCv(ofVec3f? vec); cv::Rect toCv(ofRectangle? rect); std::vector<cv::Point2f?> toCv(const ofPolyline& polyline); std::vector<cv::Point2f?> toCv(const std::vector<ofVec2f?>& points); std::vector<cv::Point3f?> toCv(const std::vector<ofVec3f?>& points); cv::Scalar toCv(ofColor color);
toOf
openFrameworks/色
- cv::cvtColor(src, dst, CV_RGB2BGR);