Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. void* detect_cpp(void * ptr_data)
  2. {
  3. LOGI("enter to detect");
  4. cv::Mat cvmat;
  5. cv::Mat cvMatConverted;
  6. cvmat = cv::Mat(720, 1280, CV_8UC3, ptr_data);
  7. LOGI("cvmat: cols %d, rows %d, ptr %u\n", cvmat.cols, cvmat.rows,cvmat.data);
  8. LOGI("before converted");
  9. //cvMatConverted = cv::Mat(720,1280, CV_8UC3, ptr_data);
  10. LOGI("before cvtcolor");
  11. cv::cvtColor(cvmat,cvMatConverted,CV_YUV2BGR_NV12);
  12. LOGI("after cvtcolor");
  13. //IplImage* imgScribble = cvCreateImage(cvSize(1280, 720), 8, 3);
  14. //cvZero(imgScribble);
  15. cv::imwrite("/sdcard/emma-frame.jpg",cvMatConverted);
  16. return NULL ;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement