Mask bright spots [closed]
Hello, I'm trying to detect contours in a video but i also want to ignore/mask the bright objects in it (leds, light sources...). Is there a way to do it?
Hello, I'm trying to detect contours in a video but i also want to ignore/mask the bright objects in it (leds, light sources...). Is there a way to do it?
Asked: 2018-05-09 10:58:32 -0600
Seen: 649 times
Last updated: May 09 '18
Weird result while finding angle
OpenCV Tutorial 1 - Add OpenCV on API 8
Understand the memory managment while using imread() on allocated Mat
High-level implementation of Canny
Source code to Closing Holes Leaf Image
Real-Time Video Zoom & Sharpening
OpenCV4Android: Extracting a MatOfPoint from a Canny image for input into convexHull
Please post your code so far, and any input image samples would be nice.
You can iterate over your image and write to another image the white and not white parts, if you're looking to make a mask.
What language are you using?
I'm using Opencvforunity and i was warned about posting code that corresponds to that asset previously, i'm only searching for functions/ways to do so in here (because the community is better) and then i'll look for the corresponding ones in the asset. Basically all i'm doing is this:
-blurring the image using a median filter
-using morphological operation for noise removal
-using canny for edge detection
is there a way to apply a reversed threshold?
reversed threshold? can you post image for each step?
thresh = cv2.threshold(blurred, 200, 255, cv2.THRESH_BINARY) This operation takes any pixel value p >= 200 (bright) and sets it to 255 (white). Pixel values < 200 are set to 0 (black). I would like to do the opposite of that and if it's possible i would like to preserve the grayscale version instead of using a binary image.
Have you tried cv2.THRESH_BINARY_INV?
I'm still not sure to understand what you mean : "preserve the grayscale ". You should read doc (and curve )about threshold parameters