Ask Your Question
0

Round each floating number element to the nearest integer in a Matrix [closed]

asked 2017-01-06 08:44:38 -0600

azdoud.y gravatar image

updated 2017-01-06 08:47:55 -0600

Dear community

is there any built in function that makes a Round of all Mat element, it basically do the same as the following one I don't want to iterate over every pixel and use

int cvRound(double value);

Mat nameFunc(Mat A);

Thank you

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2017-01-07 03:25:54.613890

Comments

thank you, that was useful

azdoud.y gravatar imageazdoud.y ( 2017-01-06 12:52:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-01-06 09:18:55 -0600

LBerger gravatar image

may be you can use convertTo

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-01-06 08:44:38 -0600

Seen: 1,497 times

Last updated: Jan 06 '17