2,869 questions
0
votes
0
answers
11
views
Trying to apply mask to an image with similar dimension yet fails
Trying to implement mask in form of array from torch.Tensordata type, with this code
color = np.array([0, 255, 0], dtype="uint8")
masked_image = np.where(predicted_panoptic_map, image)
#...
0
votes
0
answers
26
views
Why is getInterfaceAddress.getNetworkPrefixLength returns -1 when using any wireguard vpn?
So im trying to get all masks of Ipv4 Addresses in all of netints, but for whatever reason any address inside vpn interface has a networkPrefixLength of -1. Why is it happening? (btw it only happens ...
0
votes
0
answers
36
views
STL to binary mask conversion
I have an STL file and I would like to make a binary mask from it in MATLAB, that would be defined similar to this:
stl_mask = zeros(size(stl_file));
stl_mask(stl_indices) = 1
I have searched around ...
1
vote
0
answers
42
views
Fixed masked-image background-color with scrollable background image?
I'm building a small website with a rather particular background.
My goal is to apply a masked background image gradient to the repeated background image pattern (flowers.png), in a way that the ...
0
votes
0
answers
47
views
How to add a Border to a mask in CSS, HTML, JavaScript?
I want to add a blue border to my mask and I'm struggling with that for few days.
This is the situation:
When you scroll down, a circle appears and gradually gets bigger. Inside this circle, the new ...
0
votes
0
answers
57
views
Smart CSS Mask using gradient and dynamic border radius
trying to make a css mask using the way the amazing Temani Afif shows here.
Unfortunately, what I need differs from what Temani shows in his examples.
Here is what I've manage to achieve:
CSS MASK ...
0
votes
0
answers
41
views
How to do composite from PIL using only OpenCV? [duplicate]
Hello I want to combine a green image mask (3 channels with a squared figure only with the green channel as 255) with a 3 channels image using opencv in python. I cannot use PIL.Image.composite since ...
1
vote
0
answers
57
views
Rounding the edges of the PyQT6 window Web interface, web widget web Python
I need to round the Pyqt6 window with a web interface, a web widget, so that the edges are even, QSS does not work in this case, because the interface is not QT, setMask works, but it is impossible to ...
-1
votes
1
answer
64
views
SVG Mask element is hiding portions of the screen that it should not when placed in negative coordinates
Two snippets are included. Functionally, they should be the same. They are both designed to be a mask that has the exact same points as the polyline using the mask, and the mask is white, so ...
0
votes
1
answer
40
views
Crash when scrolling a UITableView after applying mask to an image
I am applying a mask to an image in a custom table cell. The mask works correctly but as soon as I scroll the table I get a Fatal error: Unexpectedly found nil while unwrapping an Optional value on ...
1
vote
0
answers
15
views
Unreal, Mask out player model that overlaps a weapon for sprite sheet export
I am able to create an animation sequence and export 8 frames for walking as a sprite sheet.
I want to export the player model without a weapon (which I have done)
I want to export the weapons ...
0
votes
1
answer
42
views
Need assistance generating clip path for the attached image [closed]
I would like to know how I can generate the required mask for the attached image. I have tried various methods but I am unable to get the rounded corners with the mask per the given image.
Is there an ...
1
vote
3
answers
81
views
Tracing edges of pixels in a mask
I have a mask bitmap consisting of a 2D array of 1 and 0 values, which I would like to convert to a polygon, where the polygon traces exactly around the edges of the pixels. The regions in the mask ...
0
votes
0
answers
20
views
Mask over the tropic in Healpix
I have my data in Healpix grid, I'm trying to apply a mask over the tropic as follow:
NSIDE = hp.get_nside(EP)
npix = hp.nside2npix(NSIDE)
theta, phi = hp.pix2ang(NSIDE, np.arange(npix))
...
1
vote
1
answer
78
views
How to prevent last character from changing based on date in imask library?
I want to make a mask for a date range. But when I delete the last character in the start date, it is replaced by a digit from the end date.
Is it possible to make it so that when a latest character ...
0
votes
0
answers
27
views
Separating and indexing intensity datasets to different planes/coordinates
I have been using k wave in MATLAB to record the intensity patterns of some ultrasound transductors, at different planes of the 3D simulation grid. I have been defining a sensor for each plane, and ...
0
votes
1
answer
50
views
Set a boolean Mask for a Group with a Condition
If the Value '2235' is in column 'Age', the associated Group in the Column 'Name' should be set for all true in a new Column.
My Test-Dataframe is:
import pandas as pd
# intialise data of lists.
data ...
0
votes
0
answers
15
views
Masks in CVAT python high-level API
Let's say I'm fetching annotations from a CVAT job:
with make_client(host=HOST, port=PORT, credentials=(USER, PASS)) as client:
job = client.jobs.retrieve(id)
annotations = job.get_annotations(...
0
votes
2
answers
223
views
Abaqus scripting: Create a Set from a Face object
I created in Abaqus v6.14 scripting an extruded Part p with BaseSolidExtrude, which is then a cylinder (not necessarily circular). I want to create three sets, one for the top and bottom surface, and ...
0
votes
1
answer
88
views
Extrusion effect on SVG
I am trying to create an extrusion effect with a shadow on existing svg files.
My approach is to have the unaltered file on one hand and use it as a source to another file on the other hand, in which ...
0
votes
0
answers
26
views
Cut out transparent hole inside div [duplicate]
im trying to inherit gradient background color grom grandparent to child.
{/* Gradient **GRANDFATHER***/}
<div
className={'flex-1 flex flex-col-reverse relative'}
style={{background:'...
0
votes
1
answer
68
views
Box like shadow in swiftUI
I have added a VStack, I am adding 3 elements like Top , middle and bottom and adding shadow respectively. Problem is I am getting 1px gap between the elements even after adding spacing as 0.
Top ...
5
votes
2
answers
100
views
Numpy: apply mask to values, then take mean, but in parallel
I have an 1d numpy array of values:
v = np.array([0, 1, 4, 0, 5])
Furthermore, I have a 2d numpy array of boolean masks (in production, there are millions of masks):
m = np.array([
[True, True, ...
4
votes
4
answers
131
views
Find the largest rectangular bounding box containing only ones in a 2d mask NumPy array
I have a 2d mask where I'd like to find the largest rectangular bounding box containing only ones.
Is there a more efficient way than determining all possibilities for bounding boxes and then ...
0
votes
0
answers
28
views
Mask div using SVG with filter?
I have a div, that I want to be masked by an svg containing a filter. Specifically, I have a parent SVG that has a mask containing a filter to create a cloud effect.
<svg
version="1.1&...
2
votes
1
answer
50
views
Numpy memory error when masking along only certain axis, despite having sufficient RAM
I have a large array and I want to mask out certain values (set them to nodata). But I'm experiencing an out-of-memory error despite having sufficient RAM.
I have shown below an example that ...
0
votes
1
answer
359
views
Next.js SVG Image Mask (Reusable component)
I've been trying all day to create a reusable Next.js SVG Image mask component, using only tailwind / inline styles for locally stored images. I want to be able to pass an svg into it and an image and ...
4
votes
1
answer
252
views
How to remove visually perceivable non-contiguous horizontal lines from scanned image of a table?
The source image contains a table on which I performed erosion/dilation using horizontal and vertical kernel to find/detect horizontal and vertical lines. Then I used findContours and drawContours ...
0
votes
0
answers
26
views
CSS fade works in emulation on desktop, not on actual mobile device
I have created the following mask and tested it by means of the desktop browser's mobile device emulation (from the Developer Tools in Firefox):
.Main
{
position: fixed;
width: ...
0
votes
0
answers
43
views
assignin() is not working inside mask initialization code
I am trying to add a Simulink.signal variable in 'base' workspace within a block's mask initialization code using assignin () function. Now, this is quite unsuccessful and to my surprise I am not ...
0
votes
1
answer
101
views
HTML and CSS only mask overlay, is it possible?
How to create a CSS-only overlay over images or other HTML elements?
Something like this:
All examples found until now suggest assigning a background and using a mix of either masks or clip-paths ...
0
votes
1
answer
39
views
How to integrate decimal numbers to be displayed in the MUI Textifeld but not to change the value
I want to apply that the number to be displayed in MUI Textfield form to be in decimal display, is there a possible way to integrate mask input, so input value does not alter as decimal but just to be ...
0
votes
1
answer
57
views
Applying mask on part of an element
I'm encountering difficulty in applying a mask to only the top portion of an element rather than the entire element. I'm uncertain if I'm approaching this correctly.
I have an element called "...
0
votes
0
answers
68
views
Leaky ReLU: Forward and backward propagation with mask and alpha
I would like to implement forward and backward propagation using Numpy by the Leaky ReLU with mask and alpha and would appreciate advice on the out and dout sections below.
If it were a simple ReLU ...
0
votes
1
answer
70
views
An 'if' statement isn't executing when a mask is applied to a variable even though it should
In my example, I’m creating an integer variable called testVar and I make it equal to A1 in hexadecimal. When printing out the variable, it shows that it should indeed be equal to A1 in hexadecimal. ...
0
votes
0
answers
19
views
SVG with straight lines and gradient mask not rendering [duplicate]
I am trying to create a sort of flowing pipes effect using svg on my website.
This works great:
<svg width="100%" viewBox="0 0 360 182" fill="none" xmlns="http://www.w3.org/2000/svg">
<...
1
vote
0
answers
77
views
Mask-image on element with backdrop-filter breaks when parent has overflow:hidden and border-radius set
I've come across this chrome bug detailed here:
https://issues.chromium.org/issues/40778541
Is there any work around to this? Basically, when giving a clipping child's parent overflow:hidden or border-...
0
votes
0
answers
46
views
How to install and use maskedtensor properly in torch?
I got this problem when trying to use maskedtensor in backpropagation. But it works well without maskedtensor. It seems like something wrong with maskedtensor. But I don't know how to fix it.
torch 1....
2
votes
1
answer
91
views
svg mask is broken with <use>
I created a simple Snippet to demonstrate a different behavior between Chrome/Safari and Firefox.
<svg style="display:none" xmlns="http://www.w3.org/2000/svg">
<symbol id="foo">
...
-1
votes
1
answer
50
views
Left shift vs Mask Uint8Array
I wanted to know if anyone knows what would be faster and why.
do:
this.data[byte] |= 1 << bitIndex;
Or do1:
const BIT_MASKS: Uint8Array = new Uint8Array([1, 2, 4, 8, 16, 32, 64, 128]);
this....
0
votes
1
answer
13
views
How to mask resolver name from requestor in service now itsm
I have the use case where the requestor shouldn't not know who is resolving the ticket. The workgroup being exposed is ok. Even an alias is fine but name should not be visible. Is it possible in ...
0
votes
0
answers
61
views
Post processing refining vehicles segmentation mask
My question is about segmentation to spot light vehicles on a portion of a satellite image. I just have the satellite image and the mask (that I can open on QGIS).
Although the prediction mask has ...
1
vote
1
answer
87
views
terra mask raster by categorical raster
I have a ginormous raster (rasterA) with values in the range 1:928863, and I want values in another raster, rasterB, set to NA where values(rasterA) > 300.
the rasters are big:
library(terra)
set....
0
votes
1
answer
38
views
Dask: In-place Modification with Boolean Indexing Causing Unexpected Behavior
I would like to do an in-place bitwise operation on my dask array i, with a mask cover it.
MVE:
import dask.array as da
i = da.full((10,10),fill_value=4)
c = da.ones(i.shape, dtype=bool)
c[:,0] = ...
0
votes
1
answer
155
views
gdstk Boolean too slow but works fast in Klayout?
I am trying to cut out several holes in a rectangle. When I do this in Klayout using "Subtract others from first", the result is computed almost instantly. However, when I try to do it using ...
0
votes
0
answers
94
views
GestureHandler on a PNG image - React Native Reanimated
I'm trying to handle gestures on a PNG image in React Native (specifically [email protected]). I managed to have them working on the "square" that contains the png, but I would like to make them ...
2
votes
0
answers
148
views
FastAPI with SAM model: Only a few workers load properly due to CUDA memory error [closed]
I'm working on a project involving FastAPI with a Segment anything Model (SAM) for image processing. I have a CUDA setup with a GPU (NVIDIA RTX A4000) available for acceleration, and I'm running ...
0
votes
0
answers
26
views
How can i get the mask from contours to apply skeltonization
enter image description hereBelow is an image containing road contours. I want to apply skeletonization, but I'm getting poor results. So, I thought of first obtaining the mask from the contours and ...
1
vote
0
answers
68
views
3D segmentation mask bounding box and removal of unwanted voxels
I have a 3D segmentation mask, and I want to resize it to the dimensions of the ROI and remove the unwanted voxels around it.
This is my code for creating the 3D bounding box around the region but it'...
0
votes
0
answers
63
views
How to use template images to match and cutout scanned image files?
I am a FUJIFILM instax player.
I put the photos I took into a file bag and used a scanner to get electronic images.
How can I accurately segment these images?
I have tried to stick green paper on the ...