Home | History | Annotate | Download | only in thumbnails

Lines Matching defs:histogram

68 size_t FindOtsuThresholdingIndex(const std::vector<int>& histogram) {
71 double w1 = histogram[0]; // Total weight of the first class.
75 for (size_t i = 1; i < histogram.size(); ++i) {
76 w2 += histogram[i];
77 t2 += (0.5 + i) * histogram[i];
84 // Iterate through all possible ways of splitting the histogram.
85 for (size_t i = 1; i < histogram.size() - 1; i++) {
86 double bin_volume = (0.5 + i) * histogram[i];
87 w1 += histogram[i];
88 w2 -= histogram[i];
104 std::vector<int>* histogram,
106 DCHECK(histogram);
108 histogram->clear();
109 histogram->resize(256);
130 (*histogram)[static_cast<int>(scaled_value)] += 1;
136 const std::vector<int>& histogram,
144 DCHECK_EQ(histogram.size(), 256U);
149 // Find a cut-off point (on the histogram) closest to the desired size.
152 for (std::vector<int>::const_iterator it = histogram.begin();
153 it != histogram.end(); ++it, ++candidate_clip_index) {
466 std::vector<int> histogram;
468 if (!ComputeScaledHistogram(input, &histogram, &minmax))
473 size_t max_index = FindOtsuThresholdingIndex(histogram);