Guest User

Untitled

a guest
Feb 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. cv::Mat image;
  2.  
  3. [10, 103, 196]
  4.  
  5. cv::Mat image = cv::Mat::zeros(2,3,CV_32SC3)
  6.  
  7. [0, 0, 0, 0, 0, 0, 0, 0, 0;
  8. 0, 0, 0, 0, 0, 0, 0, 0, 0]
  9.  
  10. image = image + Scalar(3,0,0); // the result will be same as image=image+3;
  11.  
  12. [3, 0, 0, 3, 0, 0, 3, 0, 0;
  13. 3, 0, 0, 3, 0, 0, 3, 0, 0]
  14.  
  15. image = image +Scalar(3,2,-3);
  16.  
  17. [3, 2, -3, 3, 2, -3, 3, 2, -3;
  18. 3, 2, -3, 3, 2, -3, 3, 2, -3]
  19.  
  20. cv::Mat image = cv::Mat::zeros(2,3,CV_32SC3);
  21. subtract(image,Scalar(2,3,1),image);
  22.  
  23. [-2, -3, -1, -2, -3, -1, -2, -3, -1;
  24. -2, -3, -1, -2, -3, -1, -2, -3, -1]
Add Comment
Please, Sign In to add comment