OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 13 Jul 2016 12:36:36 -0500Round/Absolute Value each element of Mathttp://answers.opencv.org/question/98334/roundabsolute-value-each-element-of-mat/I am new to opencv and am trying to convert this line of matlab code to java using opencv 3.1:
- user_feature_matrix_normalize =
abs(round(user_feature_matrix.*100));
//matlab code
I think I figured out multiplication and this is what I have so far:
- Mat user_feature_matrix_normalize =
new Mat(); //java opencv code
- Scalar alpha =new Scalar(100);
- Core.multiply(user_feature_matrix,
alpha,
user_feature_matrix_normalize);
Are there any opencv functions I can use to round and take the absolute value of each element of the mat? Looking for any suggestions on how I should try to accomplish thisphillityWed, 13 Jul 2016 12:36:36 -0500http://answers.opencv.org/question/98334/