Category : mask

I have a raster image with some values are nan and these are supposed to be filled by the valid values. These valid values should meet two conditions: within a certain distance to the target pixel, and are flagged as true in an input FlagMask. The rasterio.fill.fillnodata https://rasterio.readthedocs.io/en/latest/api/rasterio.fill.html can achieve filling nodata with the distance ..

Read more

I need help with the mask parameter to apply the keypoint detection to a specific region of interest. How can I define the region with x/y ranges in a np.array? import numpy as np import cv2 as cv img = cv.imread(‘test_img.jpg’) gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY) gray2 = np.float32(gray) print(img.shape) max_corners = 20 quality_level = 8 / ..

Read more

I had the same problem as this question since 2J, but none of the answers worked with Python 3, so today I took all day to solve the problem: python opencv cv2 matchTemplate with transparency (graphics taken from the question) I finally managed to write a cv2.matchTemplate() with mask (transparency / alpha channel) and python ..

Read more