Ask Your Question

c++ similar function to numpy

asked 2019-02-04 12:29:29 -0500

ymw gravatar image

hi there, I have developed my opencv vision algorithm in python. in my algorithm I have used numpy function as follow,

roi=cv2.imread("roi.png") img=cv2.imread("image.png")
img[roi<100] = 0;

basically what I have done is, I have image (roi.png) which contain important area for generate features, so I will consider only the area in img which roi has greater values than 100, so my problem is I need to implement this code in c++, how can I do it without numpy in c++? thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-02-04 15:10:13 -0500

LBerger gravatar image

updated 2019-02-05 00:43:50 -0500

see setTo

  Mat mask=roi<100;
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-02-04 12:29:29 -0500

Seen: 39 times

Last updated: Feb 05