The starting point for a new state.
Questions tagged [threshold]
715 questions
4
votes
1 answer
Improve Text Binarization / OCR Preprocessing with OpenCV
I am building a scanner feature for my app and binarize the photo of the document with OpenCV:
// convert to greyscale
cv::Mat converted, blurred, blackAndWhite;
converted = cv::Mat(inputMatrix.rows, inputMatrix.cols, CV_8UC1);
…

Pascal
- 2,590
- 3
- 21
- 46
4
votes
0 answers
Defining a threshold for feature matching in geometrical re-ranking
I'm implementing a cache for virtual reality applications: given an input image query, return the result associated to the most visually similar cached image (so a previously processed query) if the distance between the query representation and the…

justHelloWorld
- 6,478
- 8
- 58
- 138
4
votes
3 answers
calculate number of rows in a dataframe above threshold as a function or other column factors
I would like to get find the number for rows for each subject for each day where the value is greater than 11 and output these in a data frame for analysis. The data set is large (5000 rows) so need a function for this.
subject = c(rep("A", 12),…

MLyall
- 119
- 9
4
votes
2 answers
Why is image binarization showing poorer results?
Please, refer to this journal article.
The last paragraph of the section 4.1 (Preprocessing) says that,
Using [threshold = (mean + std dev)] along with Otsu Thresholding gives the following result,
.
And, without them I obtain the following…

user366312
- 16,949
- 65
- 235
- 452
4
votes
0 answers
Threshold for TF-IDF cosine similarity scores
This question is very similar to this one: Systematic threshold for cosine similarity with TF-IDF weights
How should I cut off tiny similarities? In the link above, the answer gives a technique based on averages. But this could return documents even…

Guilherme Caminha
- 324
- 1
- 16
4
votes
4 answers
Damerau - Levenshtein Distance, adding a threshold
I have the following implementation, but I want to add a threshold, so if the result is going to be greater than it, just stop calculating and return.
How would I go about that?
EDIT: Here is my current code, threshold is not yet used...the goal is…

CaffGeek
- 21,856
- 17
- 100
- 184
4
votes
3 answers
How threshold images with texture? Recognition by tesseract
Source image:
Destination image:
Code:
cv::Mat sharpenedLena;
cv::Mat kernel = (cv::Mat_(3, 3) << 0, -1, 0, -1, 5, -1, 0, -1, 0);
cv::filter2D(matGrey, sharpenedLena, matGrey.depth(), kernel);
cv::adaptiveThreshold(sharpenedLena, matBinary,…

hnzlk2015
- 43
- 3
4
votes
1 answer
python's negative threshold, the lowest non-infinity negative number?
What is python's threshold of representable negative numbers? What's the lowest number below which Python will call any other value a - negative inifinity?

user961627
- 12,379
- 42
- 136
- 210
4
votes
1 answer
tracking multiple objects by color OpenCV 2.x
Currently i am trying to track multiple objects by color. I've based on documentation code.
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
# Take each frame
_, frame = cap.read()
# Convert BGR to HSV
hsv =…

alejandro zuleta
- 13,962
- 3
- 28
- 48
4
votes
3 answers
Does a Neural Network with Sigmoid Activation use Thresholds?
I'm a tad confused here. I just started on the subject of Neural Networks and the first one I constructed used the Step-Activation with thresholds on each neuron. Now I wan't to implement the sigmoid activation but it seems that this type of…

Marnix v. R.
- 1,638
- 4
- 22
- 33
3
votes
3 answers
R Is there a way to do thresholding in linear regression?
I'm trying to do a linear regression but I'm only looking to use variables with positive coefficients (I think this is called hard-thresholding, but I'm not certain).
for example:
> summary(lm1)
Call:
lm(formula = value ~ ., data = intCollect1[,…

screechOwl
- 27,310
- 61
- 158
- 267
3
votes
3 answers
niblack thresholding
I am trying to implement the niblack thresholding algorithm which uses the formula:
pixel = ( pixel > mean + k * standard_deviation ) ? object : background
where k has standard value 0.
Could someone please tell me how to implement this in matlab?…

NeedHelp
- 101
- 3
- 9
3
votes
1 answer
Cumulative sum with a threshold window in R data.table
I want to calculate the rolling sum of n rows in my dataset where the window size 'n' depends on the sum itself. For example, I want to slide the window as soon as the rolling sum of time exceeds 5 mins. Basically, I want to calculate how much…

srishti
- 31
- 3
3
votes
1 answer
R: Find cutoffpoint for continous variable to assign observations to two groups
I have the following data
Species <- c(rep('A', 47), rep('B', 23))
Value<- c(3.8711, 3.6961, 3.9984, 3.8641, 4.0863, 4.0531, 3.9164, 3.8420, 3.7023, 3.9764, 4.0504, 4.2305,
4.1365, 4.1230, 3.9840, 3.9297, 3.9945, 4.0057, 4.2313, 3.7135,…

OCSee
- 35
- 8
3
votes
1 answer
Creating Datadog alerts for when the percentage difference between two custom metrics goes over a specified percentage threshold
My current situation is that I have two different data feeds (Feed A & Feed B) and I have created custom metrics for both feeds:
Metric of Order counts from Feed A
Metric Order counts from Feed B
Next steps is to create alert monitoring for the…

novicedeveloper
- 31
- 1
- 2