Questions tagged [image-masking]

132 questions
2
votes
3 answers

Why does this PNG not work for CSS background-image when used elsewhere as a mask, but after uploading to Imgur it does?

This is driving me nuts. I thought this was a masking issue at first (might still be), but it seems that the original version doesn't even work as a background image in some cases. The only difference between the two is that the latter ("Imgur")…
Sarke
  • 2,805
  • 2
  • 18
  • 28
2
votes
1 answer

Masking many images from two different path opencv

Hello stackoverflow people:) I'm trying to masking many image from two different path, but I don't have an idea to do that. This an example for just two images and what I've do so far image = cv.imread('Dataset/IDRiD_02.jpg', cv.IMREAD_COLOR) od =…
2
votes
0 answers

How to plot a segmentation mask, bounding box from given annotation values?

I have some images and an annotation file (.json) which contains the information of the area, image_id, segmentation points, bounding box points for every image. I would like to plot the segmentation mask and the bounding box on my input image using…
2
votes
1 answer

How to add a mask with custom shape?

I'm trying to create a mask out of a custom shape. I tried it with image masking and the result is given below. While my desire result is not exactly. Using this Mask Image The visual effect that I want to have: Can anyone provide some hints on…
Ali Raza
  • 2,796
  • 1
  • 20
  • 24
2
votes
1 answer

Capture mouse cursor and apply transparency masking in Win32

Im trying to capture mouse cursor using windows API GetCursorInfo and taking in to CURSORINFO structure after I reading ICONINFO using GetIconInfo so I will get hbmMask and hbmColor bitmap The hbmMask bitmap is first applied with an AND raster…
Krish
  • 376
  • 3
  • 14
2
votes
1 answer

How to implement Mask R-CNN on iOS application?

We are trying to find out a specific object in Image & based on our requirement we would like to mask that object. Right now we are using tensor flow to detect an object inside a picture. To mask an object I want to use Mask R-CNN, but I am not…
Gaurav Govilkar
  • 154
  • 1
  • 1
  • 10
2
votes
1 answer

opencv overlaying one image over another with masking and in-painting

I'm using OpenCV to do in-painting on a few polygons (drawn on paper, see examples). Some legend specs: The green frame is there to draw the scene "borders", just there for reference. The blue ball is floating on the scene and when the ball hits a…
Ziv Levy
  • 1,904
  • 2
  • 21
  • 32
2
votes
1 answer

Image masking & create new UIImage

Here is the issue i am facing: I have implemented the masking using maskimage. Here is the Original Image : (Size: 300width x 418height) Here is the Mask image: (Size: 165width x 215height) Below is the code i have used to crop image according to…
Mayur Prajapati
  • 5,454
  • 7
  • 41
  • 70
2
votes
1 answer

Sprite Kit, masking node is aliased

I'm experimenting a bit with Sprite Kit. I'm trying to mask an image with an alpha png. This is easy enough but I can't find information on how to mask an image with alpha values. Right now it renders the pixel or it doesn't. From the docs on…
Dion Snoeijen
  • 94
  • 2
  • 11
2
votes
4 answers

How to get touch behind the imageview on transparent part of image on iOS?

Here I want to get the touch for button action event on button tap - B and when image is tapped (on visible area of image) the tap gesture method will call but problem is image is on the button and its covers some part of the button I wants to…
RayofHope
  • 1,187
  • 2
  • 14
  • 30
2
votes
0 answers

Mask shape working but not appliying transparency

I am trying to use a mask to hide a part of a picture, depending on where the user touch the screen. Todo so, I followed a code sample provided by Cyril Mottier. What I did until now actually work : while clicking a part of my ImageView, all what I…
1
vote
0 answers

Saving masks for Image Segmentation task: the output layer looks flat, does not react to objects in the input

I am trying to generate masks for the image segmentation task using dinov2 model. I have generated some using patch embeddings but when I try to save these mask images, the saved mask images are all black. How can i resolve this error? import numpy…
1
vote
0 answers

Image Masking pixel divition

This is the code for masking an image (see). Why does the mask need to be divided by 255? Isn't img0 = mask * img a pixelwise multiplication, so in the middle all the values will be kept (if multiplying by 1 and not divide by 255) img =…
Danny Dan
  • 25
  • 5
1
vote
0 answers

ERROR Masking image based on edge detection of stacked slices using canny edge detection in python

I am very new to image processing in Python and need your guidance. I want to mask my stacked images (sample of notch rock) based on edge detection. I am trying to use cv2.Canny edge detection, cv2.findContours, cv2.drawContours, cv2.threshold, and…
1
vote
1 answer

How to straighten the edges of a mask in python opencv?

initial mask I have the above mask which is roughly the shape of a trapezium and want to convert it to this. This would mean the sides were straightened - especially the front side of the mask. I want to alter this mask to straighten the edges and…
1
2
3
8 9