Questions tagged [threshold]

The starting point for a new state.

715 questions
2
votes
1 answer

Remove Background from Image - Python

I am trying to remove the black background from an image using OpenCV, but I am unable to remove the pixels to capture just the main imagery without the black background. Here is the code I am using, along with the original input image. import…
mdl518
  • 327
  • 3
  • 14
2
votes
2 answers

Add Constraints in a Conditional Query/Operation in Mathematica

I use the following function to perform a conditional operation on a List: consider[data_, conditionCOL_, conditionVAL_, listOfCol_] := Select[data, (#[[conditionCOL]] == conditionVAL) &][[All, listOfCol]] Considering the following example…
500
  • 6,509
  • 8
  • 46
  • 80
2
votes
2 answers

Determine the best classification threshold value for deep learning model

How to Determine the best threshold value for deep learning model. I am working on predicting seizure epilepsy using CNN. I want to determine the best threshold for my deep learning model in order to get best results. I am trying for more than 2…
2
votes
1 answer

Why is adaptive threshold image smaller than the original?

I am trying to use adapativeThreshold on a live stream that will eventually be used for shape detection. Regular threshold does not show enough of what I want to see. When I use the code below, the regular threshold comes out as expected, but the…
Samantha Garcia
  • 490
  • 6
  • 13
2
votes
4 answers

How to subset data based on two conditions

Supopose I have a dataframe df > df ID Year Weight 1 Brown 1960 5.0 2 Green 1990 3.0 3 Yellow 1961 4.8 4 Green 1994 7.0 5 Green 1993 6.0 6 Brown 1964 8.0 7 Yellow 1960 4.6 If I want to subset all IDs with a weight…
JoeN
  • 57
  • 6
2
votes
2 answers

split a dataframe

print (df) A B 0 10 1 30 2 50 3 20 4 10 5 30 A B 0 10 1 30 A B 2 50 A B 3 20 4 10 5 30
maher
  • 31
  • 5
2
votes
2 answers

create multi-colored thresholded image from grayscale heatmap in python

I have a gray-scale images and want to threshold them in 4 range of values (0.035, 0.7, 0.75), displayed by 4 different colors. I need the result saved as images in UINT8 format. The gray-scale image information is as…
2
votes
1 answer

Incorrect thresholding before string recognition

I'm trying to recognize some text with pytesseract, but before that I have to turn the picture I have into a binary one. Note that I first resize the picture to make it easier to read for pytesseract. See below the original picture, the resized one,…
2
votes
1 answer

How do I proceed to retain just the veins as black using MATLAB?

I have this Ir image that has captured the veins under the skin. I want to process this image so as to retain just the veins as black colour and get everything else as white. Then I want to generate the coordinate pixels as these black pixels which…
2
votes
2 answers

Matlab:How to eleiminate the black background and retain the region of interest in my image?

I have the following IR (infrared) image of a human fist captured with a webcamera converted to work in IR. The picture has captured the veins under the skin. What i want to do is just retain the fist and get rid of the surrounding black area. How…
khadeejah
  • 45
  • 1
  • 7
2
votes
1 answer

pROC package with pre-specified cutoff values with two decimals

In the roc function of pROC package I would like to print my specific cutoff values (print.thres parameter) with two decimal digits, because one cutoff is 0.05 and in the plot appears as 0.0 Any suggestion?
user2310909
  • 116
  • 8
2
votes
0 answers

thresholding in first and second order derivative edge detection

I'm having some conceptual confusion with regards to first and second order derivative edge detection methods. When you run a first or second derivative order filter, you get a greyscale output with gradient magnitude and rate of change of the…
2
votes
1 answer

Calculation of the maximum duration over threshold in R (timeseries)

I have a xts-timeseries temperature data in 5 min resolution. head(dataset) Time Temp 2016-04-26 10:00:00 6.877 2016-04-26 10:05:00 6.877 2016-04-26 10:10:00 6.978 2016-04-26 10:15:00 6.978 2016-04-26 10:20:00 6.978 I want to…
tobias_p
  • 23
  • 2
2
votes
0 answers

How to reconstruct the signal by applying thresholding on wavelet coefficients?

I want to reconstruct a 1D audio signal by thresholding the wavelet coefficients. First of all, I read the audio signal and normalised it. After that I added white Gaussian noise. Subsequently I calculated the maximum volume level for…
2
votes
2 answers

Look up and extract values exceeding a threshold in r

I have two data frames: #df1 df1 = data.frame(id = c("A","B","C","D","E"), dev = c(213.5, 225.1, 198.9, 201.0, 266.8)) df1 id dev 1 A 213.5 2 B 225.1 3 C 198.9 4 D 201.0 5 E 266.8 #df2 df2 = data.frame(DateTime =…
Monte
  • 131
  • 10