histogram

How do I auto correct colors in an image ?

I will work with a set of arbitrary images. Some of them might need some color correction. I've opened up an image that needed correction in Photoshop and noticed the yellows were a bit high in the Histogram. I applied Auto Color and that improved the image. How does that work ? How implement that ? Do I look for peaks in the histogra...

How to track an area enclosed by a rectangle on a video in C# ?

Hi, this is what I am doing, I take the input from a web camera onto a picturebox in C# and draw a rectangle on the video using a mouse. Then I plan to track that particular area(e.g. right eye)enclosed by the rectangle, as the video streams, for instance if the person moves to the right, the rectangle will also move to the right but wil...

Can anyone help me explain sourcode color histogram below using php GD

I want to take the color histogram value of sourcode below: description $ WR = array (48 reference colors r) $emin = sqrt(pow(($r - $wr[0]),2) + pow(($g - $wg[0]),2) + pow(($b -$wb[0]),2)); for($k=1;$k<48;$k++) { $e = sqrt(pow(($r - $wr[$k]),2) + pow(($g - $wg[$k]),2) + pow(($b -$wb[$k]),2)); if ($e < $emin) { $n = $k; ...

What kind of histogram does opencv CAMSHIFT use, is it ratio or weighted ?

Hi, I want to know the kind of histogram is used in opencv along with the camshift algorithm. Is it the ratio histogram or is it the weighted histogram ?? Many Thanks ...

python: using numpy.histogram

i am using this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html i have an list a that i want to use like this: numpy.histogram(a,bins=[0.1,0.2,0.3,0.4...6], range=[0:6]) how do i include a set of bins 0.1 through 6 in 0.1 intervals? how do i specify a range of 0 through 6? ...

Is there a more elegant replacement for this MATLAB loop?

I want to get better at vectorizing my loops in MATLAB. At the moment, I'm trying to count the occurrences of values in a list of ints. My code is similar to this: list = [1 2 2 3 1 3 2 2 2 1 5]; occurrence_list = zeros(1,max(list)); for x=list occurrence_list(x) = occurrence_list(x) + 1; end Is there a simple vectorized replacem...

Histogram with numeric x-axis in gnuplot?

Hi all, I'm having this file as data.dat: Xstep Y1 Y2 Y3 Y4 332 1.22 0.00 0.00 1.43 336 5.95 12.03 6.11 10.41 340 81.05 81.82 81.92 81.05 394 11.76 6.16 10.46 5.87 398 0.00 0.00 1.51 1.25 1036 0.03 0.00 0.00 0.00 I can plot this data as histogram with this script, hist-v1.gplot (using set style data histogram): set xlabel "X value...

Dynamically generate an R lattice graph for many fields

I'm wondering if the following is possible. I have a survey with 100+ questions, all categorical, collected in 4 locations. All questions are labeled q1, q2 and so on. Let's say there are 100 for simplicity. I can visually compare the results of a particular question across locations with: library (lattice); histogram(~ q75 | location...

adjusting x-axis in R histograms

This histogram is really ugly: hist(rbinom(10000, 20000, 0.0001),freq=F,right=F) I don't want spaces between my bars. I tried different breaks= methods but they all produce similar results. Any ideas? I also want each bin value (or mean values )to be printed under the center of it's bar. ...

How to plot two histograms together in R?

I am using R and I have two data frames: carrots and cucumbers. Each data frame has a single numeric column which lists the length of all measured carrots (total: 100k carrots) and cucumbers (total: 50k cucumbers). I wish to plot two histogram - carrot length and cucumbers lengths - on the same plot. They overlap, so I guess I also need...

How to create the histogram of an array with masked values, in Numpy?

In Numpy 1.4.1, what is the simplest or most efficient way of calculating the histogram of a masked array? numpy.histogram and pyplot.hist do count the masked elements, by default! The only simple solution I can think of right now involves creating a new array with the non-masked value: histogram(m_arr[~m_arr.mask]) This is not very...

thresholding grayscale image minimum error method algorithm

Hello, I am writing software that thresholds 24-bit color JPEGs. Currently the system uses a threshold value that I have calculated manually through trial and error using 1 sample of each document type. This method works but is prone to error if there is significant dirt/smudges on the document. The software uses IPP for decoding th...

threshold algorithm

Does anyone know of any reference or sample code of the "Minimum Error Thresholding" algorithm? Java has a method called "getMinErrorThreshold" in the Histogram class and I want to implement this algorithm in C. Thank you Alessandro Ferrucci ...

Intensity Histogram threshold algorithm in JAI

JAI's Histogram class has a method called "getMinErrorThreshold" that corresponds to some known algorithm. I would like to implement this algorithm in C given a Histogram object of my own and have failed to find sample pseudocode or code that implements this algorithm (or even a detailed description of how the algorithm computes the thr...

How to store image historgam into database and be able to perform search

I need to write webapp where user will be able to perform search based on images colors. My question is how to store color data? I think that best solution will be to reduce image colors and prepare histogram for each r, g and b channel but I don't have idea how to design database. I want to use MySQL DBMS. Could someone point me into ri...

Printing class histogram programmaticly...

is there any way to print top used N classes on the current java application programmaticly? sample output: N=10 num #instances #bytes class name -------------------------------------- 1: 23 4723136 [I 2: 19 4718928 [J 3: 18 4718880 [D 4: 73925 1774200 java.lang.String 5: ...

How to Plot a Pre-Binned Histogram In R

I have a pre-binned frequency table for a rather large dataset. That is, a single column vector of bins and a single column vector of counts associated with those bins. I'd like R to plot a histogram of this data by doing further binning and summing the existing counts. For example, if in the pre-binned data I have something like [(0.01,...

Combine clustered and errorbar histogram-style in gnuplot

I'd like draw a clustered histogram with gnuplot that has errorbars. I have not figured out any way to combine the styles. Since I want to use it for a LaTeX-document I'd even go with pgfplots, but that also seems impossible. Any help would be greatly appreciated. ...

Sorting items into bins in MATLAB

If I have a set of data Y and a set of bins centered at X, I can use the HIST command to find how many of each Y are in each bin. N = hist(Y,X) What I would like to know is if there is a built in function that can tell me which bin each Y goes into, so [N,I] = histMod(Y,X) would mean that Y(I == 1) would return all the Y in bin 1...

how to plot a histogram in c

how do I plot a histogram in c from 2 arrays? ...