The starting point for a new state.
Questions tagged [threshold]
715 questions
5
votes
1 answer
Evaluating a statistical model in R
I have a very big data set (ds). One of its columns is Popularity, of type factor ('High' / ' Low').
I split the data to 70% and 30% in order to create a training set (ds_tr) and a test set (ds_te).
I have created the following model using a…

user2878881
- 307
- 4
- 13
5
votes
0 answers
The Thresholded Histogram in Python -- Force each bin to have at least N objects
In the typical histogram created with Numpy.histogram or matplotlib.pyplot.hist, the bins are of uniform width or the user specifies his/her own bin edges. There are lots of choices about optimal bin width -- say sqrt(sample size).
Sometimes, there…

quantumflash
- 691
- 2
- 5
- 16
5
votes
3 answers
Finding first samples greater than a threshold value efficiently in Python (and MATLAB comparison)
Instead of finding all the samples / data points within a list or an array which are greater than a particular threshold, I would like to find only the first samples where a signal becomes greater than a threshold. The signal might cross the…

xaneon
- 317
- 3
- 9
5
votes
3 answers
Python module Mahotas thresholding issue
I'm using this tutorial
http://pythonvision.org/basic-tutorial
However when I pass a png image:
T = mahotas.thresholding.otsu(dna)
I get an error:
TypeError: mahotas.otsu: This function only accepts integer types (passed array of type…

Angel Cloudwalker
- 2,015
- 5
- 32
- 54
5
votes
1 answer
Illumination normalization in OpenCV
I am working on a face recognition project. I have pictures with different lighting so I need to do illumination normalization. I read a paper which which claims to do illumination normalization. The paper describe the following function and values.…

Shah
- 661
- 2
- 9
- 19
4
votes
1 answer
document image binarization
I'm trying to find effective binarization techniques for document images. I've currently implemented the niblack and sauvola thresholding algorithms and tried binarization based on histogram evaluation as well. Could someone please suggest other…

NeedHelp
- 101
- 3
- 9
4
votes
4 answers
Fast RGB Thresholding in Python (possibly some smart OpenCV code?)
I need to do some fast thresholding of a large amount of images, with a specific range for each of the RGB channels, i.e. remove (make black) all R values not in [100;110], all G values not in [80;85] and all B values not in [120;140]
Using the…

Happy
- 429
- 3
- 7
- 18
4
votes
4 answers
R- Find date when cumulative sum is above threshold
I am working with thermal requirements for crop growth. I have a table which contains cumulative temperature for a 6-month time period. Sample seen below:
date temp cum_temp
1: 2020-03-01 9.339748 9.339748
2: 2020-03-02…

thiagoveloso
- 2,537
- 3
- 28
- 57
4
votes
2 answers
Count the number of values per column above a range of thresholds in R
How to count the number of values per column above a sequence of thresholds ?
i.e.: calculate for each column, the number of values above 100, then above 150, then above ... and store the results in a data frame ?
# Reproductible data
# (Original…

Alex
- 158
- 5
4
votes
2 answers
Find indices of values greater than a threshold by row in a numpy 2darray
I have a 2darray as follows. I want to find the indexes of values above a threshold (e.g., 0.7) by each rows in the array.
items= np.array([[1. , 0.40824829, 0.03210806, 0.29488391, 0. ,
0.5 , 0.32444284, 0.57735027, 0. …

kitchenprinzessin
- 1,023
- 3
- 14
- 30
4
votes
0 answers
Writing robust (size invariant) circle detection (Watershed)
Edit: Quick Summary so far: I use the watershed algorithm but I have probably a problem with threshold. It didn't detect the brighter circles.
New: Fast radial symmetry transform approach which didn't quite work eiter (Edit 6).
I want to detect…

chris
- 155
- 1
- 10
4
votes
0 answers
Calculating a threshold based on the connectedness of a weighted graph
Given a matrix like the one that follows (but a lot bigger) that describes a weighted undirected graph,
structure(list(from = c("TPM1", "TPM1", "TPM1", "TPM1", "TPM1",
"TPM1", "TPM1", "TPM1", "TPM1", "TPM1", "TPM1", "TPM1", "TPM1",
"TPM1", "TPM1",…

J. Doe
- 619
- 4
- 16
4
votes
1 answer
threshold_local returns a different result than threshold_adaptive in scikit-image
I'm reproducing this example from the documentation:
import matplotlib.pyplot as plt
from skimage import data
from skimage.filters import threshold_otsu, threshold_adaptive
image = data.page()
global_thresh = threshold_otsu(image)
binary_global…

Luis Ramon Ramirez Rodriguez
- 9,591
- 27
- 102
- 181
4
votes
3 answers
How to apply a threshold to a pandas DataFrame column and output a row outside of the threshold?
I have a large dataset of product families. I'm trying to catch any weird data entries where a price is too high/low than the other members of the family. For example, I have a this pandas.DataFrame:
df =
Prices Product Family
0 1.99 …

Hana
- 1,330
- 4
- 23
- 38
4
votes
0 answers
Weird behavior of Intel's MKL and Python (Ubuntu 16.04, Conda 4.3.30)
I am trying to improve the performance of NumPy in Python 3.6 using Intel's MKL. With a fresh anaconda installation i created a MKL environment using:
conda create -n idp intelpython3_core python=3
As written in this article,
it seems that the…

Halgurd Taher
- 41
- 4