I'm using bwlabel, regionprops, ismember and bsxfun in MATLAB which I'm porting to cv2 Python. Does cv2 have any similar functions that I can use?
cashew_BW is a black and white 2D image
cashew_BW_labeled = bwlabel(cashew_BW);
cashew_stats = regionprops(cashew_BW_labeled, 'BoundingBox');
cashew_single_mask = ismember(cashew_BW_labeled,i) > 0;
cashew_single = bsxfun(@times, cashew_RGB, cast(cashew_single_mask, 'like', cashew_RGB));