The starting point for a new state.
Questions tagged [threshold]
715 questions
3
votes
1 answer
R: Find consecutive values beneath threshold
I need to find consecutive values in a data.frame of wind speed measurements that are smaller than a certain threshold. I'm looking for 2 consecutive observations beneath the threshold. I want to return the location of the first observation of the…

ChrM
- 61
- 3
- 12
3
votes
1 answer
sox effect: retriggerable silence
To detect speech I'm playing with this sox command:
rec voice.wav silence 1 5 30% 1 0:00:02 30%
It should start recording whenever the input volume raises about the threshold of 30% and stops after 2 seconds the audio falls below the same…

Mark
- 4,338
- 7
- 58
- 120
3
votes
3 answers
PostgreSQL calculate threshold query
i have postgresql db with a table t1 and i want to calculate a threshold.
the threshold should be for example car 1 uses more fuel than 75 % of all cars, car2 uses more fuel than 50% of all cars, ....
mathematically i understand what i want to do,…

fabvys
- 413
- 1
- 5
- 12
3
votes
3 answers
ImportError: No module named pyplot - Opencv
I am trying to execute the following code:
import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread('Paw01.png',0)
img = cv2.medianBlur(img,5)
ret,th1 = cv2.threshold(img,127,255,cv2.THRESH_BINARY)
th2 =…

Lucas
- 63
- 1
- 5
3
votes
1 answer
How to change threshold for precision and recall in python scikit-learn?
I have heard people saying you can adjust the threshold to tweak the trade-off between precision and recall, but I can't find actual example of how to do that.
My code:
for i in mass[k]:
df = df_temp # reset df before each loop
#$$
#$$
…

KubiK888
- 4,377
- 14
- 61
- 115
3
votes
1 answer
First key in OrderedDict that exceeds threshold
Say I have an OrderedDict:
a = OrderedDict([(5, 'a'), (7, 'b'), (10, 'c')])
Is there an efficient way to get the first value whose key exceeds a certain threshold, without looping over all keys?
Examples:
>>> get_first(a, 6)
'a'
>>> get_first(a,…

user3446746
- 141
- 1
- 12
3
votes
0 answers
How many thresholds and distance matrix are in Eigenface?
I edited my question trying to make it as short and precise.
I am developing a prototype of a facial recognition system for my Graduation Project. I use Eigenface and my main source is the document Turk and Pentland. It is available here:…

Marcelo Cuadrado
- 82
- 7
3
votes
2 answers
Find threshold cross in Matlab timeseries data, then ignore subsequent crosses for 60 seconds before finding next threshold cross
This is a little complicated to explain. I have time series data formatted like this: https://docs.google.com/spreadsheets/d/1B8mN0uD-t4kQr2U20gS713ZFHN6IgGB7OMR3-pqJjrw/edit?usp=sharing
That data represents voltage recordings at .01s intervals.…

user3746901
- 73
- 1
- 5
3
votes
1 answer
How to chose the optimal HSV values for InRange thresholding in OpenCV
I have two related questions:
I'm doing color object detection in OpenCV with the inRange threshold function. I'm getting excellent results if I manually choose the lower and upper HSV bounds, but this is very sensitive to the lighting conditions.…

My other car is a cadr
- 1,429
- 1
- 13
- 21
3
votes
3 answers
Otsu Thresholding on a Sobel Filtered Image gives different Results
I'm creating a Sudoku solving application on an Android platform and I've run into an issue when processing the image. I'm trying to find the horizontal lines of the puzzle using OpenCV using a Sobel filter and then thresholding with the Otsu…

user3577715
- 31
- 4
3
votes
2 answers
How to detect sign change (eg, positive to negative) in time series data?
I have data of fluxes over time and would like to obtain a list of times when the flux changed from negative to positive or vice versa. This seems like a simple thing so it probably has a simple answer but I haven't been able to find one with my…

DirtStats
- 559
- 9
- 29
3
votes
1 answer
Object detecting using thresholding
I'm working on a program in matlab to detect an object in a sequence of images. The object I'm trying to detect a red ball.
First, I tried to use thresholding to segment the ball from the image, but I couldn't do that. I couldn't get rid of the…

N4LN
- 95
- 3
- 10
3
votes
1 answer
Finding several regions of interest in an array
Say I have conducted an experiment where I've left a python program running for some long time and in that time I've taken several measurements of some quantity against time. Each measurement is separated by some value between 1 and 3 seconds with…

user3394391
- 487
- 6
- 15
3
votes
1 answer
OpenCV - Using ROI after a cvtColor
I am doing some ellipse recognition in an image and in order to do so I am opening a simple image:
img = imread("M:/Desktop/PsEyeRight.jpg", CV_LOAD_IMAGE_COLOR);
selecting a ROI (that's the only way I could see to set a ROI in OpenCV 2.4.6 where…

Michel Feinstein
- 13,416
- 16
- 91
- 173
3
votes
1 answer
opencv/python : motion detect weird thresholding
I am trying to make a motion detect program using my webcam, but I'm getting this weird results when thresholding the difference of frames:
When Im moving: (seems okay I guess)
![enter image description here][1]
When Im not moving:

Cap.Alvez
- 1,363
- 3
- 17
- 19